每次输入正确的用户名和密码后,都会出现空白页,而不跳转到指定的mainad.php,请问哪里出错了,没检查出来
<?php
$user=$_POST['user'];
$password=$_POST['password'];
if(isset($user) && strlen($user) > 0)
{
mysql_connect("localhost", "wyzx", "songzhiyuan");
mysql_select_db("wyzx") or die ("不能连接到数据库!");
$strSql = "SELECT * FROM user where user='$user' and password='$password';";
$result=mysql_query($strSql);
$num=mysql_fetch_array($result);
if(!empty($num[0]))
{
require("mainad.php");
}
else
{
require("login.php");
}
}
?>