我正在为我的公司开发内部网的问题。它在我们的服务器上本地托管并使用PHP。它有一个适用于Firefox和Chrome的登录脚本,但是当我尝试使用Internet Explorer登录时,它只会将我带回主登录页面并且根本不执行脚本。我认为它与PHP会话有关,并生成一个新的会话ID,任何想法?这是我的代码
$//If there are input validations, redirect back to the login form
if($errflag) {
$_SESSION['ERRMSG_ARR'] = $errmsg_arr;
session_write_close();
header("location: index.htm");
exit();
}
//Create query
$qry="SELECT * FROM employees WHERE username='$login' AND password='$password'";
$result=mysql_query($qry);
//Check whether the query was successful or not
if($result) {
if(mysql_num_rows($result) == 1) {
//Login Successful
session_regenerate_id();
$member = mysql_fetch_assoc($result);
$_SESSION['SESS_MEMBER_ID'] = $member['ID'];
$_SESSION['SESS_fname'] = $member['fname'];
$_SESSION['SESS_lname'] = $member['lname'];
$_SESSION['SESS_username'] = $member['username'];
session_write_close();
header("location: login_success.php");
exit();
}else {
//Login failed
header("location: login-failed.php");
exit();
}
}else {
die("Query failed");
}
有什么建议吗?