Is there a problem with IE not passing sessions? My code works in Firefox but not in IE. How can I fix it? Here's the code:
index.php :
<?php
include('the_file_including_username_password.php');
session_start();
if (!ini_get('register_globals')) {
$types_to_register = array('GET','POST','COOKIE','SESSION','SERVER');
foreach ($types_to_register as $type) {
if (@count(${'HTTP_' . $type . '_VARS'}) > 0) {
extract(${'HTTP_' . $type . '_VARS'}, EXTR_OVERWRITE);
}
}
}
if($user_in == $adm_user && $pass_in == $adm_pass) {
$_SESSION['loggedin'] = 1;
print "Log in successful. Redirecting... <META HTTP-EQUIV=\"refresh\" CONTENT=\"2; URL=admin.php\">";
}
?>
admin.php :
<?php
if (!ini_get('register_globals')) {
$types_to_register = array('GET','POST','COOKIE','SESSION','SERVER');
foreach ($types_to_register as $type) {
if (@count(${'HTTP_' . $type . '_VARS'}) > 0) {
extract(${'HTTP_' . $type . '_VARS'}, EXTR_OVERWRITE);
}
}
}
session_start();
if(!isset($_SESSION['loggedin'])) {
// display error;
exit;}
else{
?>
...some HTML...
<?php
}
?>
Thanks for the help.