|
Posted by Koncept on 10/30/06 13:53
In article <1162207549.606471.131080@i42g2000cwa.googlegroups.com>,
<crescent_au@yahoo.com> wrote:
> Hi all,
>
> I've written a login/logout code. It does what it's supposed to do but
> the problem is when I logout and press browser's back button (in
> Firefox), I get to the last login page. In IE, when I press back
> button, I get to the page that says "Page has Expired" but Firefox does
> not do this.
>
> I think it's something to do with sessions not properly unset or
> something like that but I haven't been able to figure it out. I am
> attaching my codes and database structure below. If you need more info,
> please email me. I really want this to be fixed asap. I've played with
> this long enough. Thanks!
>
Just curious what happens if you add these headers to the previous
pages?
( code from docs )
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>
And this for the destruction of the session:
<?php
$_SESSION = array();
// Note: This will destroy the session, and not just the session data!
if ( isset( $_COOKIE[session_name()] ) )
setcookie( session_name(), '', time() - 42000, '/' );
// Finally, destroy the session.
session_destroy();
?>
--
Koncept <<
"The snake that cannot shed its skin perishes. So do the spirits who are
prevented from changing their opinions; they cease to be a spirit." -Nietzsche
Navigation:
[Reply to this message]
|