note 18170 modified in function.setcookie by john
| From: | john@php.net | Date: | Thu, 28 Nov 2002 02:26:43 +0000 |
| Subject: | note 18170 modified in function.setcookie by john | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40053@lists.php.net to get a copy of this message | ||
Just lost a few hours "finding" that $HTTP_COOKIE_VARS is a global variable and you need
to do something like
global $HTTP_COOKIE_VARS;
in order to access it. Life is sad, sometimes.
[Editor's Note: As of PHP Version 4.1.0, the $_COOKIE (along with $_GET and $_POST) are
superglobal variables which can be accessed from any scope without having a global statement.]
--was--
Just lost a few hours "finding" that $HTTP_COOKIE_VARS is a global variable and you need
to do something like
global $HTTP_COOKIE_VARS;
in order to access it. Life is sad, sometimes.
http://www.php.net/manual/en/function.setcookie.php