note 66117 deleted from language.functions by bjori

From: Date: Mon, 15 May 2006 08:29:15 +0000
Subject: note 66117 deleted from language.functions by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-111305@lists.php.net to get a copy of this message
Note Submitter: dwight at wwwalker dot com dot au Reason: in docs ---- If you use cookies in a function use: function fred() { global $HTTP_COOKIE_VARS; list($var1, $var2) = explode(":",$HTTP_COOKIE_VARS[person]); } or function fred() { list($var1, $var2) = explode(":",$_COOKIE[person]); } $_COOKIE from PHP 4.1.0 onwards is autoglobal so does not need to be listed as a global in a function. $HTTP_COOKIE_VARS is not autoglobal and must be listed as a global in a function or its values will not be available to the function to process and come back blank all the time! $_COOKIE is heaps easier to use if you have PHP 4.1.0 or above.

« previous php.notes (#111305) next »