note 83844 added to function.session-destroy
| From: | ale at alejandrolapeyre dot com dot ar | Date: | Sat, 14 Jun 2008 23:16:46 +0000 |
| Subject: | note 83844 added to function.session-destroy | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-140444@lists.php.net to get a copy of this message | ||
Example #1 fails to delete the session cookie if the session COOKIE is not set but a session is
started (as the example does)
To delete the session cookie ALWAYS, change the line:
if (isset($_COOKIE[session_name()])) {
to:
if (session_id != "" || isset($_COOKIE[session_name()]))
----
Server IP: 190.2.55.3
Probable Submitter: 190.51.98.16
----
Manual Page -- http://www.php.net/manual/en/function.session-destroy.php
Edit -- https://master.php.net/note/edit/83844
Del: integrated -- https://master.php.net/note/delete/83844/integrated
Del: useless -- https://master.php.net/note/delete/83844/useless
Del: bad code -- https://master.php.net/note/delete/83844/bad+code
Del: spam -- https://master.php.net/note/delete/83844/spam
Del: non-english -- https://master.php.net/note/delete/83844/non-english
Del: in docs -- https://master.php.net/note/delete/83844/in+docs
Del: other reasons-- https://master.php.net/note/delete/83844
Reject -- https://master.php.net/note/reject/83844
Search -- https://master.php.net/manage/user-notes.php