PDA

View Full Version : php error, need fixing



xRoyal15
24-06-2006, 03:50 PM
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 :D


<?
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>

Impossible
24-06-2006, 03:58 PM
<?
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.

xRoyal15
24-06-2006, 04:37 PM
I now get:

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

:S

DMB-Hosting
24-06-2006, 08:49 PM
hightlight line 66 i cba to find it

xRoyal15
25-06-2006, 09:50 AM
nvm, all fixed now :D


<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?

Flisker
28-06-2006, 05:47 AM
there must be 2 "?>" somewhere i can'T find it but its somewhere

Want to hide these adverts? Register an account for free!