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
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
Means you havn't configerd somthink right i think the config.php the data base
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
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.
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.
Yeh sorry that werent the line the new bold one is, thanks for trying tho. +rep
echo ("Your account $username has been banned until $checkban[time]!");
Try:
echo ("Your account:" $username "has been banned until:" $checkban[time]);
Try
echo $username "has been banned until"; $checkban[time]
Try that.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>";
}
?>
Last edited by Impossible; 22-07-2006 at 02:05 PM.
:eusa_whis
None of the above work. Ryan using yours line 52 (the same line but moved again) is still the one with the error
Want to hide these adverts? Register an account for free!