can expired Session be restored?
Posted: Tue Apr 01, 2008 2:22 am
Hi,
I have the following code to logout.
It is working correctly BUT when I click the "Go Back" button (one or many times) on the browser, I have the following message:
"the page you are trying to view contains POSTDATA taht has expired from cache. If you resend the data, any action the form carried out will be repeated. To resend the data, click OK. Otherwise, click Cancel. "
and when I click OK, it displays the home page which should be displayed after the login page. That means the browser restores an expired session.
Please help me.
I have the following code to logout.
Code: Select all
if (isset($_POST["logout"])) { // logout button is clicked
// destroy session session
unset($_SESSION['id']);
unset($_SESSION['name']);
session_destroy();
// destroy cookies
$sessionPath = session_get_cookie_params();
setcookie(session_name(), "", 0, $sessionPath["path"], $sessionPath["domain"]);
header('Location: http://localhost/myfolder/login.php');
} // if (isset($_POST["logout"]))"the page you are trying to view contains POSTDATA taht has expired from cache. If you resend the data, any action the form carried out will be repeated. To resend the data, click OK. Otherwise, click Cancel. "
and when I click OK, it displays the home page which should be displayed after the login page. That means the browser restores an expired session.
Please help me.