note 56646 deleted from function.setcookie by nlopess
| From: | nlopess@php.net | Date: | Thu, 29 Sep 2005 08:31:36 +0000 |
| Subject: | note 56646 deleted from function.setcookie by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-95960@lists.php.net to get a copy of this message | ||
Note Submitter: tohe at centrum dot cz
----
It's needed to globalize array $_COOKIES or $HTTP_COOKIE_VARS if it's used inside a
function, like
<?
function getcookie($name){
global $HTTP_COOKIE_VARS;
if(!isset($HTTP_COOKIE_VARS[$name])) return false;
return $HTTP_COOKIE_VARS[$name];
}
?>