Re: Cookies not being read - begging php 4 chapter 8 pg 283
| From: | Jason Wong | Date: | Sat, 05 Apr 2003 07:40:15 +0000 |
| Subject: | Re: Cookies not being read - begging php 4 chapter 8 pg 283 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142489@lists.php.net to get a copy of this message | ||
On Saturday 05 April 2003 01:13, Paul Kraus wrote:
> Ok I fixed this by adding this line to the top of my script.
>
> $font=$HTTP_COOKIE_VARS['font'];
> Then everything worked great.
> I tried to access them like this
> $HTTP_COOKIE_VARS[font['type']] but this would not work.
>
> Is my syntax wrong are must you always set the http_cookie to a variable
> if it's an array?
The syntax for accessing items in multi-dimensional arrays is:
$HTTP_COOKIE_VARS['font']['type']
> This book does not mention HTTP_COOKIE_VARS at all.
> Nor did it mention $_POST or $_GET.
>
> Am I doing something wrong with my script do I need to change something?
>
> Is there a new way to do $HTTP_COOKIE_VARS like there is for POST and
> GET?
$_COOKIE
THe book is out of date. RTFM for the latest info, also read the
changelog/history to see what has changed since the version of PHP mentioned
in your book was released.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
The human mind ordinarily operates at only ten percent of its capacity
-- the rest is overhead for the operating system.
*/