From f927c63767f581726408358395ffa8474c3ec093 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Wed, 1 Sep 2004 00:31:31 +0000 Subject: [PATCH] Implemented info/example about deleting the session id cookie. Removed deprecated use of session_unset() and wrote it as a note instead. Implemented return.success, and added see also. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@167763 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../session/functions/session-destroy.xml | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/reference/session/functions/session-destroy.xml b/reference/session/functions/session-destroy.xml index e302011b0d..0dea0e8170 100644 --- a/reference/session/functions/session-destroy.xml +++ b/reference/session/functions/session-destroy.xml @@ -1,5 +1,5 @@ - + @@ -18,50 +18,51 @@ the global variables associated with the session, or unset the session cookie. + + In order to kill the session altogether, like to log the user out, the + session id must also be unset. If a cookie is used to propogate the + session id (default behavior), then the session cookie must be deleted. + setcookie may be used for that. + - This function returns &true; on success and - &false; on failure to destroy - the session data. + &return.success; - Destroying a session + Destroying a session with <varname>$_SESSION</varname> ]]> + + + Only use session_unset for older deprecated code + that does not use $_SESSION. + + - - Destroying a session with $_SESSION - - -]]> - - + See also + unset and + setcookie.