Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Help please

  1. #1
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default Help please

    what does this mean is wrong?

    Code:
    Parse error: parse error, unexpected T_STRING in /home/habblast/public_html/users/login.php on line 47

  2. #2
    Join Date
    Mar 2006
    Location
    a house in a box
    Posts
    1,779
    Tokens
    0

    Latest Awards:

    Default

    Means you havn't configerd somthink right i think the config.php the data base

  3. #3
    Join Date
    Jun 2006
    Location
    Northamptonshire
    Posts
    1,063
    Tokens
    0

    Latest Awards:

    Default

    Urm no it means theres an error on the 47th line of 'login.php'

    Please post the script for login.php and i will be happy to help you.
    :eusa_whis

  4. #4
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default

    Thanks!! The Bold line is the 47th line. well its actually the 50th becuase i edited it.

    Code:
    <? 
    oB_start(); 
    // allows you to use cookies. 
    include("config.php"); 
    if (!$logged[username]) 
    { 
    if (!$_POST[login]) 
    { 
    echo(" 
    <center><form method=\"POST\"> 
    <table> 
    <tr> 
    <td align=\"right\"> 
    Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\"> 
    </td> 
    </tr> 
    <tr> 
    <td align=\"right\"> 
    Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"password\"> 
    </td></tr><tr> 
    <td align=\"center\"> 
    <input type=\"submit\" name=\"login\" value=\"Login\"> 
    </td></tr><tr> 
    <td align=\"center\"> 
    <a href=\"register.php\">Register Here</a>
    <a href=\"forgot.php\">Forgotten Your password?</a> 
    </td></tr></table></form></center>"); 
     } 
    if ($_POST[login]) { 
    // the form has been submitted.  We continue... 
    $username=$_POST['username']; 
    $password = md5($_POST[password]); 
    // the above lines set variables with the submitted information.   
    $info = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());
    $data = mysql_fetch_array($info);
    //checks for ban
    $banned = mysql_query("SELECT * FROM banned WHERE username = '$username'") or die(mysql_error());
    $checkban = mysql_fetch_array($banned);
    $date = date('m/j/y');
    } 
    else  
    {   
    if ($checkban[time] == $date)//their set time is up so it must be deleted now!
    {
    $delete = mysql_query("delete from banned where username = '$username'");
    echo ("Your account $username has been un-banned! You may now log in!);
    }else{
    if ($checkban[username] && $checkban[time] != $date) // checks to see if the name is banned and if it is until how long
    {
    echo ("Your account $username has been banned until $checkban[time]!");
    }else{
    if($data[password] != $password) { 
    // the password was not the user's password! 
    echo "Incorrect username or password!"; 
    }else{ 
    // the password was right! 
    $query = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error()); 
    $user = mysql_fetch_array($query); 
    // gets the user's information 
    setcookie("id", $user[id],time()+(60*60*24*5), "/", ""); 
    setcookie("pass", $user[password],time()+(60*60*24*5), "/", ""); 
    // the above lines set 2 cookies. 1 with the user's id and another with his/her password.   
    echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://habblast.com/users/login.php\"/>Thank You! You will be redirected"); 
    // modify the above line...add in your site url instead of yoursite.com 
    } 
    } 
    } 
    else 
    { 
    // we now display the user controls. 
    $new = mysql_query("select * from pmessages where unread = 'unread' and touser = '$logged[username]'"); 
    $new = mysql_num_rows($new); 
    echo ("<center>Welcome <b>$logged[username]</b><br /></center> 
    - <a href=\"users/editprofile.php\">Edit Profile</a><br /> 
    - <a href=\"users/members.php\">Member List</a><br /> 
    - <a href=\"users/messages.php\">Private Message Center ($new new)</a><br />
    - <a href=\"users/onlineusers.php\">Online Users</a><br /> 
    - <a href=\"users/searchbox.php\">Search for a user</a><br />
    - <a href=\"users/staff.html\">Meet the staff</a><br />
    - <a href=\"users/find.php\">Find user information</a><br />
    - <a href=\"users/cpass_frm.php\">Change Password</a><br />
    - <a href=\"users/banned.php\">Ban User</a><br />
    - <a href=\"users/logout.php\">Logout</a>"); 
    if($logged[username] && $logged[level] == 5)
    echo "- <a href=\"admin.php\">Admin Centre</a>";
    }
    if($logged[username] && $logged[level] == 4)
    echo "<a href=\"mod.php\">Moderator Centre</a>"; 
    } 
    if($logged[username] && $logged[level] == 3)
    echo "<a href=\"DJinfo.html\">DJing Information</a>"; 
    } 
    ?>
    Last edited by ClubTime; 22-07-2006 at 01:40 PM.

  5. #5
    Join Date
    Nov 2004
    Location
    HabboWeb FM Offices
    Posts
    3,019
    Tokens
    0

    Latest Awards:

    Default

    try
    echo ("Your account $username has been un-banned! You may now log in!");

    or
    echo "Your account has been unbanned! Dont forget, to login you need this username:"; $username

    Edit: You changed it again
    Last edited by :Blob; 22-07-2006 at 01:43 PM.

  6. #6
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default

    Yeh sorry that werent the line the new bold one is, thanks for trying tho. +rep

  7. #7
    Join Date
    Dec 2005
    Location
    XX
    Posts
    2,308
    Tokens
    2,015

    Latest Awards:

    Default

    echo ("Your account $username has been banned until $checkban[time]!");

    Try:

    echo ("Your account:" $username "has been banned until:" $checkban[time]);


  8. #8
    Join Date
    Nov 2004
    Location
    HabboWeb FM Offices
    Posts
    3,019
    Tokens
    0

    Latest Awards:

    Default

    Try
    echo $username "has been banned until"; $checkban[time]

  9. #9
    Join Date
    Jun 2006
    Location
    Northamptonshire
    Posts
    1,063
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <? 
    oB_start
    (); 
    // allows you to use cookies. 
    include("config.php"); 
    if (!
    $logged[username]) 

    if (!
    $_POST[login]) 

    echo(

    <center><form method=\"POST\"> 
    <table> 
    <tr> 
    <td align=\"right\"> 
    Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\"> 
    </td> 
    </tr> 
    <tr> 
    <td align=\"right\"> 
    Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"password\"> 
    </td></tr><tr> 
    <td align=\"center\"> 
    <input type=\"submit\" name=\"login\" value=\"Login\"> 
    </td></tr><tr> 
    <td align=\"center\"> 
    <a href=\"register.php\">Register Here</a>
    <a href=\"forgot.php\">Forgotten Your password?</a> 
    </td></tr></table></form></center>"
    ); 
     } 
    if (
    $_POST[login]) { 
    // the form has been submitted.  We continue... 
    $username=$_POST['username']; 
    $password md5($_POST[password]); 
    // the above lines set variables with the submitted information.   
    $info mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());
    $data mysql_fetch_array($info);
    //checks for ban
    $banned mysql_query("SELECT * FROM banned WHERE username = '$username'") or die(mysql_error());
    $checkban mysql_fetch_array($banned);
    $date date('m/j/y');

    else  
    {   
    if (
    $checkban[time] == $date)//their set time is up so it must be deleted now!
    {
    $delete mysql_query("delete from banned where username = '$username'");
    echo (
    "Your account $username has been un-banned! You may now log in!);
    }
    else
    {
    if (
    $checkban[username] && $checkban[time] != $date) // checks to see if the name is banned and if it is until how long
    {
    echo ("
    Your account '$username' has been banned until $checkban[time]!");
    }
    else
    {
    if(
    $data[password] != $password) { 
    // the password was not the user's password! 
    echo "
    Incorrect username or password!"; 
    }
    else

    // the password was right! 
    $query = mysql_query("SELECT FROM users WHERE username '$username'") or die(mysql_error()); 
    $user = mysql_fetch_array($query); 
    // gets the user's information 
    setcookie("
    id", $user[id],time()+(60*60*24*5), "/", ""); 
    setcookie("
    pass", $user[password],time()+(60*60*24*5), "/", ""); 
    // the above lines set 2 cookies. 1 with the user's id and another with his/her password.   
    echo ("
    <meta http-equiv=\"Refresh\" content=\"0; URL=http://habblast.com/users/login.php\"/>Thank You! You will be redirected"); 
    // modify the above line...add in your site url instead of yoursite.com 



    else 

    // we now display the user controls. 
    $new mysql_query("select * from pmessages where unread = 'unread' and touser = '$logged[username]'"); 
    $new mysql_num_rows($new); 
    echo (
    "<center>Welcome <b>$logged[username]</b><br /></center> 
    - <a href=\"users/editprofile.php\">Edit Profile</a><br /> 
    - <a href=\"users/members.php\">Member List</a><br /> 
    - <a href=\"users/messages.php\">Private Message Center (
    $new new)</a><br />
    - <a href=\"users/onlineusers.php\">Online Users</a><br /> 
    - <a href=\"users/searchbox.php\">Search for a user</a><br />
    - <a href=\"users/staff.html\">Meet the staff</a><br />
    - <a href=\"users/find.php\">Find user information</a><br />
    - <a href=\"users/cpass_frm.php\">Change Password</a><br />
    - <a href=\"users/banned.php\">Ban User</a><br />
    - <a href=\"users/logout.php\">Logout</a>"
    ); 
    if(
    $logged[username] && $logged[level] == 5)
    echo 
    "- <a href=\"admin.php\">Admin Centre</a>";
    }
    if(
    $logged[username] && $logged[level] == 4)
    echo 
    "<a href=\"mod.php\">Moderator Centre</a>"

    if(
    $logged[username] && $logged[level] == 3)
    echo 
    "<a href=\"DJinfo.html\">DJing Information</a>"

    ?>
    Try that.
    Last edited by Impossible; 22-07-2006 at 02:05 PM.
    :eusa_whis

  10. #10
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default

    None of the above work. Ryan using yours line 52 (the same line but moved again) is still the one with the error

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •