The same login code, there is no problem in FF, IE is not.

Source: Internet
Author: User
The same login code, FF no problem, IE is not.
Login page: login.php
A total of three pages, want to open the other two pages, if not logged in, will first jump to the login page.
Enter user name eye password is correct, save to session, this time can browse each page freely, do not need to log in repeatedly.

There is no problem in FF, as expected,
The login page has been displayed in IE and the session has not been saved successfully. Hope Phper can help answer. Thank you

The complete login.php code is attached as follows:



if ($_get[out]) {
unset ($_session[' admin_user ');
unset ($_session[' admin_pass ');

echo "";
}
if (!isset ($_session[' Admin_user '))//**** if * * * *
{

if (!$_post[' submit ']) {
echo "Please login first!";
Include ' login.htm ';
}
else{
$admin _user=$_post[' Admin_user '];
echo $admin _user;
$admin _pass=$_post[' Admin_pass '];
$rs = $db->execute ("Select Admin_user,admin_pass from". Table_prefix. " Gbconfig where admin_user= ' ". $admin _user." ");
if ($db->num_rows ($rs) >=1) {
$row = $db->fetch_array ($rs);
$db->free_result ($RS);
echo "Free_result run
". $admin _pass."
";
if ($row [' Admin_pass ']== $admin _pass) {
$_session[' Admin_user ']= $admin _user;
$_session[' Admin_pass ']= $admin _pass;//save SESSION
echo "Session save successful";

echo "Login successful, please wait ....
If the browser does not return to the home page, click here ";
if (Isset ($_session[' Userurl ')) {
$url =$_session[' Userurl '];
Header ("Location: $url");

location.href=$_session[' Userurl '];
echo " ";
}
Else
echo " ";
echo "";

}
else{
echo "";
}
}
else{
echo "";
echo " ";


}



}
}
else{//* * * ELSE * * *

?>

Exit

echo "Show list";
?>


}?>

Manage Login Page








------Solution--------------------
How can I not see session_start ()?
------Solution--------------------
Maybe it's your JS compatibility problem.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.