Re: RE: How do I prevent a session from rebuilding itself?

From: Date: Wed, 12 Jul 2006 11:55:59 +0000
Subject: Re: RE: How do I prevent a session from rebuilding itself?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-239336@lists.php.net to get a copy of this message
On 7/12/06, Daevid Vincent <daevid@daevid.com> wrote:
I am thinking you are killing the first session, rming the files, then creating a new session. At the end of the page the data that was in memory is getting written to the new session file. Yes. That's what is happening as I said. I don't want it to re-write.
Just to be clear, what exactly are you trying to do? Are you trying to kill a session, as in log a person off? Then do so within PHP: [code] // set $_SESSION to empty array $_SESSION = array(); // if saving session in cookie, clear that out too if(isset($_COOKIE[session_name()])) { setcookie(session_name(),'',time() - 4800,'/'); } // destroy session completely session_destroy(); [/code] HTH, John W

« previous php.general (#239336) next »