// Convert password to md5 hash
$password = md5($password);
// check if the user info validates the db
$sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' AND activated='1'");
$Updatesql = mysql_query("SELECT new_login FROM users WHERE username = '$username'") or die(mysql_error());
while($r = mysql_fetch_array($Updatesql))
{
mysql_query("UPDATE users SET last_login = '$r[new_login]', new_login = now() WHERE username = '$username'") or die(mysql_error());
}
}
}
else
{
$errorMsgR .= '<div style="width:200px" id= "formmessage">';
$errorMsgR .= "You could not be logged in! Either the username and password do not match or you have not validated your membership!<br />Please try again!<br />";
$errorMsgR .= '</div>';
include ('index.php');
}
?>
Your PHP versions do not support the php_check_syntax() function, try placing the above code at the top of the erroneous PHP script. It will set the error_reporting directive to report all errors that the PHP parser encounters. For best results, remove all instances of the silence operator (@) as it will suppress the relative error message.
PHP Code:
// place this code at the top of the relative script
error_reporting(E_ALL);
Bookmarks