RE: [PHP] session and back button
| From: | kaab kaoutar | Date: | Tue, 22 May 2001 17:08:40 +0000 |
| Subject: | RE: [PHP] session and back button | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-53884@lists.php.net to get a copy of this message | ||
Hi!
Thanks!
I have created sessions in a page that is no more visited, but still when i go through the other pages using session variables and use go back to another page that uses sessions i have the expiration message
Thanks
From: "Boget, Chris" <Chris.Boget@wild.net> To: "'kaab kaoutar'" <kaab_k@hotmail.com>, php-general@lists.php.net Subject: RE: [PHP] session and back button Date: Tue, 22 May 2001 11:40:23 -0500 I'm using sessions and if the user hits the back button an expiration page appears! how can i disable the back button ? i tried window.history.forward(1) but it fails ! Even more interesting is that when a user presses the back button all the way back to the page that initially started the session, a new session is started. As such, all information previously stored will be lost. What I did to fix my problem (and I think it'll fix yours) is that I start the session on a page the user cannot go "back" to. To do that, the only code in the file is: <? session_start(); header( "location: /home_page.php" ); exit(); ?> Chris_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.