Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2005
    Posts
    856
    Tokens
    0

    Default php error, need fixing

    its a simple variable error, but i cant fix it... can you?


    Parse error: syntax error, unexpected T_LNUMBER in /home/ourhabbo/public_html/site/login.php on line 66

    mmm... i cant upload the file to here... so i will copy and paste

    <?
    ob_start();
    include("config.php");
    include("online.php");
    ?>
    <html>

    <head>
    <meta http-equiv="Content-Language" content="en-gb">
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>OurHabbo</title>
    <link rel="stylesheet" href="style.css" type="text/css" media="screen">
    <style>
    <!--

    div
    {
    font-size: 10px;
    font-family: verdana;
    }
    .bwrap2
    {
    margin-left: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
    margin-right: 10px;
    font-size: 8px;
    border: solid 1px #808080;
    background: #efefef;
    padding: 1px 1px 1px 1px;
    }

    -->
    </style>
    </head>

    <body>

    <p>UserCP.</p>
    <p>This page is where you will find all the links you need to manage your user
    account.</p>
    <p>
    <?
    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\">
    <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\" value=\"USERNAME\">
    </td>
    </tr>
    <tr>
    <td align=\"right\">
    <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"password\" value=\"PASSWORD\">
    </td></tr><tr>
    <td align=\"center\">
    <input type=\"submit\" name=\"login\" value=\"Login\" size="20">
    </td></tr><tr>
    <td align=\"center\">
    <a href=\"register.php\">Register Here</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);
    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=\"usercp.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.
    echo ("<center>Welcome <b>$logged[username]</b><br /></center>
    <img border=\"0\" src=\"nav6.png\" width=\"19\" height=\"19\"><a href=\"editprofile.php\">Edit Profile</a><br />
    <img border="0" src="nav5.png" width="19" height="19"><a href=\"members.php\" target=\"iframe\">Member List</a><br />
    <img border="0" src="nav4.png" width="19" height="19"><a href=\"find.php\" target=\"iframe\">Find User</a><br />
    <img border="0" src="nav3.png" width="19" height="19"><a href=\"uploadimages.php\" target=\"iframe\">Upload Image</a><br />
    <img border="0" src="nav2.png" width="19" height="19"><a href=\"showimages.php\" target=\"iframe\">View ALL Images</a><br />
    <img border="0" src="nav1.png" width="19" height="19"><a href=\"showimages.php\" target=\"iframe\">View ALL Images</a><br />
    <img border="0" src="nav6.png" width="19" height="19"><a href=\"member_images.php\" target=\"iframe\">Edit Your Images</a><br />
    <img border="0" src="nav5.png" width="19" height="19"><a href=\"messages.php\" target=\"iframe\">Private Messages</a><br />
    <img border="0" src="nav4.png" width="19" height="19"><a href=\"changepass.php\" target=\"iframe\">Change Password</a><br />
    <img border="0" src="nav3.png" width="19" height="19"><a href=\"logout.php\">Logout</a>");
    }
    ?>
    </p>
    </body>

    </html>

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

    Latest Awards:

    Default

    PHP Code:
                                  <? 
    ob_start
    (); 
    include(
    "config.php"); 
    include(
    "online.php"); 
    ?> 
    <html>

    <head>
    <meta http-equiv="Content-Language" content="en-gb">
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>OurHabbo</title>
    <link rel="stylesheet" href="style.css" type="text/css" media="screen">
    <style>
    <!--

    div
    {
    font-size: 10px;
    font-family: verdana;
    }
    .bwrap2
    {
    margin-left: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
    margin-right: 10px;
    font-size: 8px;
        border: solid 1px #808080;
        background: #efefef;
        padding: 1px 1px 1px 1px;
    }

    -->
    </style>
    </head>

    <body>

    <p>UserCP.</p>
    <p>This page is where you will find all the links you need to manage your user 
    account.</p>
    <p>
    <? 
    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\"> 
    <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\" value=\"USERNAME\"> 
    </td> 
    </tr> 
    <tr> 
    <td align=\"right\"> 
    <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"password\" value=\"PASSWORD\"> 
    </td></tr><tr> 
    <td align=\"center\"> 
    <input type=\"submit\" name=\"login\" value=\"Login\" size=\"20\"> 
    </td></tr><tr> 
    <td align=\"center\"> 
    <a href=\"register.php\">Register Here</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); 
    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=\"usercp.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. 
    echo ("<center>Welcome <b>$logged[username]</b><br /></center> 
    <img border=\"0\" src=\"nav6.png\" width=\"19\" height=\"19\"><a href=\"editprofile.php\">Edit Profile</a><br /> 
    <img border="
    0" src="nav5.png" width="19" height="19"><a href=\"members.php\" target=\"iframe\">Member List</a><br />
    <img border="
    0" src="nav4.png" width="19" height="19"><a href=\"find.php\" target=\"iframe\">Find User</a><br />
    <img border="
    0" src="nav3.png" width="19" height="19"><a href=\"uploadimages.php\" target=\"iframe\">Upload Image</a><br />
    <img border="
    0" src="nav2.png" width="19" height="19"><a href=\"showimages.php\" target=\"iframe\">View ALL Images</a><br />
    <img border="
    0" src="nav1.png" width="19" height="19"><a href=\"showimages.php\" target=\"iframe\">View ALL Images</a><br />
    <img border="
    0" src="nav6.png" width="19" height="19"><a href=\"member_images.php\" target=\"iframe\">Edit Your Images</a><br />
    <img border="
    0" src="nav5.png" width="19" height="19"><a href=\"messages.php\" target=\"iframe\">Private Messages</a><br />
    <img border="
    0" src="nav4.png" width="19" height="19"><a href=\"changepass.php\" target=\"iframe\">Change Password</a><br />
    <img border="
    0" src="nav3.png" width="19" height="19"><a href=\"logout.php\">Logout</a>"); 

    ?> 
    </p>
    </body>

    </html>
    Try that.
    Last edited by Impossible; 24-06-2006 at 03:59 PM.
    :eusa_whis

  3. #3
    Join Date
    Aug 2005
    Posts
    856
    Tokens
    0

    Default

    I now get:

    Parse error: syntax error, unexpected T_LNUMBER in /home/ourhabbo/public_html/site/login.php on line 100

    :S

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

    Latest Awards:

    Default

    hightlight line 66 i cba to find it


  5. #5
    Join Date
    Aug 2005
    Posts
    856
    Tokens
    0

    Default

    nvm, all fixed now

    PHP Code:
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-gb">

    <title>OurHabbo - Call for Help</title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <link rel="stylesheet" href="../style.css" type="text/css" media="screen">
    </head>
    <body bgcolor="transparent">
    <? 
    ob_start
    (); 
    include(
    "config.php"); 
    if (!
    $_GET[user]) 

    $getuser mysql_query("SELECT * from users order by id asc"); 
    while (
    $user mysql_fetch_array($getuser)) 

    // gets all the users information.
    echo("<p align=\"center\">Are other Habbos hassling you? Send an emergency Call for Help to the 
    moderators.</p>
    <p align=\"center\">This is for emergencies only. For general queries use the Contact Us form.</p>
    <p align=\"center\">Write your emergency Call for Help here:</br><i>
    <font size=\"2\">Example: Bluelord is hassling me</font></i></p>
    <form method=POST name=\"Call for Helps\" action=--WEBBOT-SELF-->
      <!--webbot bot=\"SaveResults\" u-file=\"../callforhelp.txt\" s-format=\"TEXT/PRE\" s-label-fields=\"TRUE\" b-reverse-chronology=\"FALSE\" s-builtin-fields u-confirmation-url=\"../home.php\" --><p align=\"center\">
      <input type=\"hidden\" size=\"15\" name=\"ip\" value=\"
    $userip\"><br />
      <textarea rows=\"5\" name=\"Call for Help\" cols=\"34\"></textarea></p>
      <p align=\"center\">
      <input type=\"submit\" value=\"Send\" name=\"Send\" size=\"20\"><input type=\"reset\" value=\"Clear\" name=\"Clear\" size=\"20\"></p>
    </form>"
    );
    ?>
    </body>
    </html>
    but that file has this error:

    Parse error: syntax error, unexpected $end in /home/ourhabbo/public_html/site/call.php on line 34


    fix please?
    Last edited by xRoyal15; 25-06-2006 at 09:51 AM.

  6. #6
    Join Date
    Aug 2005
    Location
    Tunbridge Wells, Kent
    Posts
    5,063
    Tokens
    1,624

    Latest Awards:

    Default

    there must be 2 "?>" somewhere i can'T find it but its somewhere
    Never argue with an idiot, he'll drag you down to his level, and beat you with experience.

    Quote Originally Posted by Recursion
    *oh trust me
    *I would NEVER go ATi
    And 15 mins later...
    Sapphire ATI Radeon HD 5850 1024MB GDDR5 PCI-Express Graphics Card £195.73 1 £195.73
    *ordered.

Posting Permissions

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