note 43619 deleted from function.session-unregister by philip
| From: | philip@php.net | Date: | Sun, 04 Mar 2007 00:28:27 +0000 |
| Subject: | note 43619 deleted from function.session-unregister by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-124060@lists.php.net to get a copy of this message | ||
Note Submitter: jop at yes2web dot nl
----
It took me some time to figure this out:
If you have register globals off, you probably use $_SESSION to acces you session vars. If you want
clear a sessionvar inside the current script, but also in next pages, do this as follows:
session_unregister('varname');
Otherwise varname will keep returning either inside the script, or on the next pages.
unset($_SESSION['varname']) will only unset the session var on the current page.