note 103159 deleted from reserved.variables.cookies by danbrown
| From: | danbrown@php.net | Date: | Tue, 29 Mar 2011 17:11:31 +0000 |
| Subject: | note 103159 deleted from reserved.variables.cookies by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178307@lists.php.net to get a copy of this message | ||
Note Submitter: Sam Yong - hellclanner [at] live dot com
----
To illustrate what Chris Watson meant:
<?php
setcookie('test', 'value');
var_dump($_COOKIE['test']);
?>
The output is "NULL". The reason being that $_COOKIE is only loaded with the cookies
received from the browser, not those that you've just set.