Re: Session destruction problem

From: Date: Sun, 17 Feb 2008 19:46:04 +0000
Subject: Re: Session destruction problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-269444@lists.php.net to get a copy of this message
Hi, Thanks for the link, it is very interesting, but as the author says, the solutions are not perfect. I'm wondering how yahoo mail for example are doing, or maybe they are using something else (not php)? Thank you --- tedd <tedd.sperling@gmail.com> wrote: > At 12:31 PM -0800 2/16/08, Adil Drissi wrote: > >Hi everybody, > > > >I need help with sessions. > >I have a simple authentification relying only on > >sessions (i don't use cookies). After the user > submits > >his username and password, the script checks if > that > >corresponds to a record in a mysql table. If this > is > >the case "$_SESSION['sessioname'] = > $_POST['login'];". > >the $_SESSION['sessioname'] is checked in > subsequent > >pages to see if the user is connected or not. > >The problem is after the user logs out, and after > that > >uses the previous button of the browser he becomes > >connected. How can i prevent this please. > > > >Here is my logout.php: > > > ><?php > >session_start(); > >unset($_SESSION["sessioname"]); > >session_destroy(); > >header("location: index.php"); > >?> > > That will destroy the session, but not the browser > history. > > You'll need javascript to alter window history. > > Google "window.history.forward" > > Here's one link that may help: > > http://www.4guysfromrolla.com/webtech/111500-1.2.shtml > > Cheers, > > tedd > > -- > ------- > http://sperling.com > http://ancientstones.com > http://earthstones.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping

« previous php.general (#269444) next »