DaddyD: $_Session IE 7

Beitrag lesen

Hallo,
ich habe jetzt schon alles ausprobiert, aber ich habe mein Login-Script im Internet Explorer 7 nicht zum laufen bekommen. Im FF und im IE6 und so geht es. Der Safari beim MAC weigert es sich beim ersten Versuch, dann macht er aber mit.

Hier der Code:

<?php
$page="index.php";
require_once('config.php');
#Load Design
require_once('design.php');

#Security striping
$_GET[expired]=strip_tags($_GET[expired]);
$_GET[logout]=strip_tags($_GET[logout]);
$_POST[submit_login]=strip_tags($_POST[submit_login]);
$_POST[login_email]=strip_tags(strtolower($_POST[login_email]));
$_POST[password]=strip_tags($_POST[password]);

#Reason for automatic logoff
$expired=$_GET[expired];
$logout=$_SESSION["session_id"];

if ($logout) {
 $result=mysql_db_query($db,"UPDATE users SET accesstime='0' WHERE session_id='$logout'");
 $result=mysql_db_query($db,"UPDATE users SET userip='0' WHERE session_id='$logout'");
 $result=mysql_db_query($db,"UPDATE users SET session_id='0' WHERE session_id='$logout'");
}

#Login Check
$submit_login=$_POST[submit_login];
$login_email=$_POST[login_email];
$password=md5($_POST[password]);
if ($submit_login=="login" AND $login_email!="0") {
 $password_db_query=mysql_db_query($db,"SELECT id,password FROM users WHERE login_email=LOWER('$login_email')");
 $expired="login_email";
 while ($password_db = mysql_fetch_array($password_db_query,MYSQL_NUM)) {
  if ($password_db[1]) {
   if ($password==$password_db[1]) {
    $logintime=time();
    $userid=$password_db[0];
    $session_id=md5($logintime.$login_email.$userid);
    $userip=$_SERVER['REMOTE_ADDR'];
    $result=mysql_db_query($db,"UPDATE users SET session_id='$session_id' WHERE id='$userid'");
    $result=mysql_db_query($db,"UPDATE users SET accesstime='$logintime' WHERE id='$userid'");
    $result=mysql_db_query($db,"UPDATE users SET userip='$userip' WHERE id='$userid'");
    $_SESSION["session_id"]=$session_id;
    $host  = $_SERVER['HTTP_HOST'];
    $uri  = rtrim(dirname($_SERVER['PHP_SELF']), '/\');
    header('P3P: CP="NOI NID ADMa OUR IND UNI COM NAV"');
    header("Location:http://$host$uri/nextpage.php");
    session_write_close();
    die();
   }
   else { $expired="password"; }
  }
 }
}
#End Login Check

#Start HTML
echo "<html>
<head>
<title>Login".date("Y-m-d")."</title>

<script language='JavaScript' type='text/javascript'>
<!--
function check_js() {
 document.login.submit_login.disabled=false;
}
//-->
</script>

</head>
<body bgcolor=#FFFFDF onload='check_js();'>

<form action='$PHP_SELF' method='POST' name='login'>
<table border=0>
<tr><th colspan=2>Login</th></tr>
<tr><td>E-Mail-Address:</td><td><input type='text' name='login_email' size='20' maxlength='50' value='$login_email' tabindex='1'></td></tr>
<tr><td>Password:</td><td><input type='password' name='password' size='20' maxlength='30' tabindex='2'></td></tr>
<tr><td><font size=2><a href='forgotpwd.php'>Forgot your password?</a></font></td><td><input type='submit' name='submit_login' value='login' tabindex='3' disabled></td></tr>
<tr><td colspan=2><center></center></td></tr>
</table>
</form>
<noscript>
Please turn on JavaScript<br>
</noscript>";

#Check Reason for automatic logoff
if ($expired) {
 if ($expired=="session_id") { echo "Your Session-ID is invalid"; }
 if ($expired=="timeout") { echo "Site was not used for too long"; }
 if ($expired=="login_email") { echo "E-Mail-Address not found"; }
 if ($expired=="password") { echo "Invalid Password"; }
 if ($expired=="ipconflict") { echo "Simultaneous login not allowed"; }
 echo "<br><br>";
}
#End Check Reason for automatic logoff

echo "</center>";

#Insert Bottom Line
bottom_line($session_id);

echo "</body>
</html>";
#End HTML
?>

config.php:
<?php

#Connecting Database ($db = Used Database)
$request=mysql_connect('127.0.0.1','xxxxxx','xxxxxx');
$db="xxxxxxx";

#Start Session
session_start();

?>

design.php:
<?php

#Bottom Line
function bottom_line($session_id) {
 echo "<div style='position:relative; bottom:-10px;'>
 <span style='color:black; font-size: 9; left:20px;'>(c) H. Mustermann 2007 <a href='impressum.php'>Impressum</a></span>
 </div>
 <div style='position:relative; bottom:-10px;'>&nbsp;</div>";
}
#End Bottom Line

?>

Hat jemand eine Idee?

Danke schon mal im Voraus.