我最近升级了我的 php 版本,但我的登录表单不再有效。如果我输入正确的输入.. 它不会重定向,而是显示一个空白页。我仍在学习,任何帮助将不胜感激。
<?
session_start();
if(!empty($_SESSION[uname]))
{
header("location:homepage.php");
exit();
}
require_once "conn.php";
if(isset($s1))
{
if(!empty($uname1) && !empty($upass1))
{
$sql = "SELECT * FROM members_info WHERE uname = '$uname1' AND upass = '$upass1'";
$result = mysql_query($sql);
if(mysql_num_rows($result) == "1")
{
$a = mysql_fetch_array($result);
$_SESSION[uname] = $uname1;
header("location:homepage.php");
exit();
}
else
{
$login_error = "The username and password you entered was invalid.";
}
}
}
include_once "main3.php";
?>