我正在登录并注册页面,但我似乎无法显示HTML部分。我认为PHP代码有问题。我在一个可以访问PHPMyAdmin和MySQL的网站上托管它。我已经查找了我的问题,无法找到答案。我检查了语法,但它仍然无法正常工作。有人可以告诉我出了什么问题吗?
<?php
session_start();
if(isset($_SESSION['sig']))
{
#User is already logged in
echo("<script>window.location='home.php'</script>");
}
if(isset($_REQUEST['submit'])
{
#Perform login action
$username=$_REQUEST['UserUsername'];
$password=$_REQUEST['UserPassword'];
include ('db_login.php');
$query=mysql_query("SELECT * FROM Users WHERE UserUsername='".$username."' AND UserPassword='".$password."'");
$row=mysql_fetch_arr($query);
if(empty($row))
{
#False Info / User doesn't exist
echo('<script>alert("False login credentials!");</script'));
}
else
{
#User exists and login is successful
$_SESSION['sig']="OK";
}
}
?>