Re: session_destroy();

From: Date: Tue, 09 Nov 2004 14:53:06 +0000
Subject: Re: session_destroy();
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-37207@lists.php.net to get a copy of this message
Chris Payne wrote:
I need to destroy a session in the browser so when they log out it clears all the session data from the browser, I have tried: session_destroy(); But it doesn’t seem to do it as the browser keeps the same PHPSessionID. What is the best way to destroy a session and generate a new sessionid without having to close the browser and go back again?
the session_id and the session-data is not the same, the session-data is destroyed with session_destroy() but the session_id is kept within a cookie (or as an url-parameter) you can php tell to user another session_id, but this changes nothing than the id, it makes no sense for you, except you saved the session_id in any logging-facility and thats the reason why you always need a new session_id. sebastian

« previous php.db (#37207) next »