note 11422 added to setcookie
| From: | PJ at piggei dot com | Date: | Tue, 20 Feb 2001 15:28:43 +0000 |
| Subject: | note 11422 added to setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-11307@lists.php.net to get a copy of this message | ||
WARNING!
In a code like this:
-------
if (condition)
header("Location: s_pw.php");
setcookie ("name", "true", time() + 3600);
-------
the coockie is *always* sent!
(the location is an header and doesn't work like a goto)
http://www.php.net/manual/en/function.setcookie.php