RE: [PHP] Re: here is the problem again
| From: | Chris W. Parker | Date: | Tue, 22 Mar 2005 21:13:13 +0000 |
| Subject: | RE: [PHP] Re: here is the problem again | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-211327@lists.php.net to get a copy of this message | ||
AndreaD <mailto:andrea.davidson@silene.co.uk>
on Tuesday, March 22, 2005 12:25 PM said:
> The cookie will not/set or print out.
> http://www.aztechost.com/problem.phps
setcookie("cookie[$name]", $age);
echo $_COOKIE[$name];
I think it should be:
setcookie("cookie[$name]", $age);
echo $_COOKIE['cookie[{$name}]'];
??
Please see http://www.php.net/setcookie.
Also you're teaching yourself a very bad habit of writing scripts with
register_globals turned on. See google for more information.
Chris.