Re: session_unregister and session_destroy
| From: | Plutarck | Date: | Wed, 04 Apr 2001 04:27:38 +0000 |
| Subject: | Re: session_unregister and session_destroy | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-46968@lists.php.net to get a copy of this message | ||
First of all, in sessions you have two different things. You have the
session itself, which is basically a "container" for variables. Then you
have the variables themselves, which is what is inside your container.
session_unregister removes the variable from the container (you have to say
which one you want removed). session_unset clears off the values of all the
variables inside the container.
session_destroy however destroys the container itself plus everything inside
of it.
So when killing a session, use session_destroy. I personally use
session_unset right before session_destroy to ensure all the variables go
either bye bye or become false.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Jacky"" <jacky@activelifestyle.com> wrote in message
news:019101c0bd20$afc1f120$6400a8c0@activelifestyle.com...
Hi people
What is the different between session_unregister and session_destroy? If i
want to delete session, which one should I used?
Jack
jacky@activelifestyle.com
"There is nothing more rewarding than reaching the goal you set for
yourself"