have a look into your PHP.INI:

; - register_globals = Off
;     Global variables are no longer registered for input data (POST, GET,
cookies,
;     environment and other server variables).  Instead of using $foo, you
must use
;     $HTTP_POST_VARS["foo"], $HTTP_GET_VARS["foo"],
$HTTP_COOKIE_VARS["foo"],
;     $HTTP_ENV_VARS["foo"] or $HTTP_SERVER_VARS["foo"], depending on which
kind
;     of input source you're expecting 'foo' to come from.

In order to find cookie in $testcookie, you must set
register_globals = On

otherwise you must use $HTTP_COOKIE_VARS["testcookie"] instead

bye
MaT
> -----Original Message-----
> From: dohman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 08, 2001 7:39 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] help on cookies please
>
>
> I'm new to this whole PHP thing, but heres my problem
>
> using w2k, apache 1.3.? and php4 and IE5
>
> basically whaat i want to know is how to accesss a cookie's value from
> localhost, that is both server and browser are on the same computer?
>
> I use setcookie("testcookie","test", time()+360) and the
> cookie is placed
> (it shows up in my temp inet files) but i can't retrieve the
> data. I should
> just be able to use '$testcookie' to get the value 'test' right?
>
> no value shows up.  I don't get an 'undefined variable'
> error, its just an
> empty value.
>
> what am i doing wrong?  thanks in advance!
>
> chris
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
>


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to