note 101237 deleted from function.session-unset by danbrown
| From: | danbrown@php.net | Date: | Sat, 04 Dec 2010 13:20:39 +0000 |
| Subject: | note 101237 deleted from function.session-unset by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-174608@lists.php.net to get a copy of this message | ||
Note Submitter: fgibson75 at gmail dot com
----
@dash2nash:
Your PHP is not removing the session variables. Note that the session variables are loaded by the
LAST call in your sequence, session_start(). The preceding calls are irrelevant. For example,
calling session_unset() frees the currently registered session variables -- of which they are none.
The session variables are not being read and instantiated until you reach session_start().
The proper way to destroy a session is documented in session_destroy(). Note that if you are
propagating your session with a cookie, you are also required to remove the cookie. See Example 1.
http://php.net/manual/en/function.session-destroy.php