Re: Session destruction problem

From: Date: Thu, 21 Feb 2008 10:45:21 +0000
Subject: Re: Session destruction problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-269774@lists.php.net to get a copy of this message
Adil Drissi wrote:
thank you tedd, I understood what you explained to me last time. I was wondering if there is another method to prevent that. Thanks --- tedd <tedd.sperling@gmail.com> wrote:
At 2:45 PM -0800 2/19/08, Adil Drissi wrote:
Hi, Below you'll find my code. I think now that the problem is in my algorithm, because the is created anytime the page is refreshed. But i don't know how
to
check if the client was logged out or it is a real
new
connexion to the page. As you will see one can
click
on logout, then press the back button of the
browser,
and then refresh the page, but he is still
connected.
I would like to help me fixe that. Here is the
code: You received an answer, but fail to understand. Unless you use javascript to manipulate the browser's history you are going to continue to have "problems" with the user browser's back button. But, explain why the user using the back button is a problem. If he logs in, he's in. If he logs out, he's out. If he hits the back button after logging out and cancels his log out -- so what? What problems does that present? 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
      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. http://www.yahoo.com/r/hs
Looks like your on an old 4.x version of php; try the following. <?php session_start(); unset($_SESSION["sessioname"]); session_destroy(); session_write_close(); sleep(1); header("location: index.php"); ?> Regards Nathan

« previous php.general (#269774) next »