From 89c906c1db3212bf0f5b8b06e124400207b169e8 Mon Sep 17 00:00:00 2001 From: Friedhelm Betz Date: Tue, 18 Feb 2003 11:08:29 +0000 Subject: [PATCH] setcookie.xml git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@116906 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/http/functions/setcookie.xml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/reference/http/functions/setcookie.xml b/reference/http/functions/setcookie.xml index da6b2cddd2..63fe9e3a7a 100644 --- a/reference/http/functions/setcookie.xml +++ b/reference/http/functions/setcookie.xml @@ -1,5 +1,5 @@ - + @@ -41,16 +41,14 @@ All the arguments except the name argument - are optional. If only the name argument is present, the cookie - by that name will be deleted from the remote client. You may - also replace an argument with an empty string + are optional. You may also replace an argument with an empty string ("") in order to skip that - argument. Because the expire and + argument. Because the expire and secure arguments are integers, they cannot - be skipped with an empty string, use a zero (0) + be skipped with an empty string, use a zero (0) instead. The following table explains each parameter of the setcookie function, be sure to read the - Netscape cookie specification + Netscape cookie specification for specifics. @@ -181,6 +179,9 @@ Cookies must be deleted with the same parameters as they were set with. + If the value argument is an empty string (""), and all other arguments + match a previous call to setcookie, then the cookie with the specified + name will be deleted from the remote client. @@ -262,7 +263,8 @@ setcookie ("TestCookie", "", time() - 3600, "/~rasmus/", ".example.com", 1); you have array elements, but when the cookie is received by your script, the values are all placed in an array with the cookie's name: - + + <function>setcookie</function> and arrays ]]> - + For more information on cookies, see Netscape's cookie