您好,所以我的 PHP 脚本在我的 if 语句的右括号中给了我一个错误,错误如下,这极大地阻碍了我,任何帮助将不胜感激,谢谢。
解析错误:语法错误,第 40 行出现意外的 T_ELSE
if($numrows !=0) {
while ($rows = mysql_fetch_assoc($query)) {
$dbusername = $row['username'];
$dbpassword = $row['password'];
}
if ($username==$dbusername&&$password==dbpassword) {
echo "Login Successful. <a href='homepage.html'>Click Here to go to the home page</a>";
$_SESSION['username']=$dbusername;
}
else {
echo "Incorrect Login";
}
else {
die ("This account does not exsist");
}
else {
die ("Please enter a username and password");
}
}