Firefox logs out fine, all pages show that I'm not logged in (e.g. going back to the admin.php page)
IE - I log out, but when going back in to admin.php, it reports that I'm logged in. The user is only shown as being logged out when a hard refresh is carried out.
This problem is driving me nuts!
The code for the logout page:
Code: Select all
<?php
//global $current_module_name;
global $current_url;
//$current_url = $_SERVER['PHP_SELF']."?name=$current_module_name";
//$address = $_SERVER['PHP_SELF'];
if(isset($_GET['ac'])) {
$ac = $_GET['ac'];
scan($ac);
if(loggedIn()) {
if($ac=='logout') {
if(activeAdmin()) {
unset($_SESSION['admin']);
}
session_unset();
header("Location:index.php");
}
}
}
if(loggedIn()) {
$user_name = $_SESSION['user_name'];
print "<p>Logged In As: $user_name</p>\n";
print "<p><a href=\"$current_url&ac=logout\">Logout Here</a></p>\n";
}
else {
print "<p>Not Logged In</p>\n";
print <<<EOF
<p>
<form action="$address" method="post">
<label>User Name:
<input type="text" name="username" size="15" /></label><br/>
<label>Password:
<input type="password" name="password" size="15" /></label><br/>
<input type="submit" value="Log In" />
</form>
</p>
EOF;
}
?>Code: Select all
function loggedIn() {
if($_SESSION['logged_in']==true) {
return true;
}
}