I just wrote a PHP login script, and what I'm trying to execute is that when the user clicks on the logout link, after logging out, regardless of clicking the browserโs back button, they cannot access the page .
Here is the exit function:
//Start the Session session_start(); session_destroy(); header("location:login.php"); exit();
I posted the following code on all pages, and this does not seem to do the job:
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header ("Last-Modified: " . gmdate("D, d MYH:i:s") . " GMT"); header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); //Start the Session session_start();
Any suggestions?
php
Ole media
source share