Hi. I have a logout page that supposedly destroys all session and sends the user to the login page.
I am using this as my logout code
<?
// logout.php - destroys session and returns to login form
// destroy all session variables
session_start();
session_destroy();
// redirect browser back to the index page. If the log out worked then the index page will kick them to the login.php page because there will be no session data.
header("Location: index.php");
?>
Now, when I run this page it does kick the user to the login.php page, which makes it appear as though the session data has been destroyed. However, when you hit the browsers back button, you go right back to the page you were at as though you are still logged in:mad: You can refresh the page and still stay logged in. Now, I know my checklogin.php page works correctly because if you try to navigate to any pages without having logged in it will kick you out as it is supposed to. But when I use the logout page you can navigate back to the other pages as thoug you are still logged in.
Any idea what's going on here?
Thanks!