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