Re: session_unset doesn't end the session. Was: [PHP-DEV] Sessions - lack of support for endingn a session and beginning a new one.

From: Date: Mon, 05 Jun 2000 19:42:29 +0000
Subject: Re: session_unset doesn't end the session. Was: [PHP-DEV] Sessions - lack of support for endingn a session and beginning a new one.
References: 1 2 3 4 5  Groups: php.dev 
Request: Send a blank email to php-dev+get-20285@lists.php.net to get a copy of this message
I just wanted to post a code snippit just so that I was clear about what my code was doing: // destroy the old session session_name("UserPref"); session_destroy(); session_unset(); // load the new one $UserPref = $row->sess_id; session_name("UserPref"); session_start(); Daniel At 02:31 PM 06/05/2000 -0500, you wrote:
On Mon, 05 Jun 2000, Daniel Beckham wrote: Ok, I tried using session_unset() before session_start(), but it doesn't do what I was hoping. I grabbed the latest phpdoc cvs and took a look at the session docs and the synopsis for session_unset() is: The session_unset function free's all session variables currently registered. Unless the docs just aren't clear, it doesn't end the session, just un-registers all of the registered variables for me. session_unset() unsets all the registered session variables. session_destroy() will destroy the session. There is no session_end() as far as I'm aware - but is there a big need for it? Your session is saved at the end of each request. -Andrei "Freedom comes when you learn to let go. Creation comes when you learn to say no."
                          -madonna


« previous php.dev (#20285) next »