I’ve got a simple login system going with php sessions. The issue I’m having is even after hitting “logout”, I can still go back to the previous page by hitting the back button.
The way I’m logging out is done by the following…
<?php
session_start();
session_unset();
session_destroy();
header("Location: ./login.php"); // redirect to login page.
?>
How do I completely delete a session..?
This will log you out. As commented, hitting back will more than likly be loading browser cache. Therefore as long as you have security properly in place – clicking on something should result in your login page being displayed.