View Full Version : Help please
ClubTime
22-07-2006, 01:18 PM
what does this mean is wrong?
Parse error: parse error, unexpected T_STRING in /home/habblast/public_html/users/login.php on line 47
nick12
22-07-2006, 01:29 PM
Means you havn't configerd somthink right i think the config.php the data base
Impossible
22-07-2006, 01:31 PM
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.
ClubTime
22-07-2006, 01:34 PM
Thanks!! The Bold line is the 47th line. well its actually the 50th becuase i edited it.
<?
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>";
}
?>
:Blob
22-07-2006, 01:39 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
ClubTime
22-07-2006, 01:50 PM
Yeh sorry that werent the line the new bold one is, thanks for trying tho. +rep
DMB-Hosting
22-07-2006, 01:58 PM
echo ("Your account $username has been banned until $checkban[time]!");
Try:
echo ("Your account:" $username "has been banned until:" $checkban[time]);
:Blob
22-07-2006, 02:03 PM
Try
echo $username "has been banned until"; $checkban[time]
Impossible
22-07-2006, 02:04 PM
<?
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.
ClubTime
22-07-2006, 02:14 PM
None of the above work. Ryan using yours line 52 (the same line but moved again) is still the one with the error
ClubTime
22-07-2006, 06:29 PM
anyone else got any other ideas?
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.