Re: Cookie with Netscape
| From: | Teodor Cimpoesu | Date: | Tue, 30 Jan 2001 09:07:30 +0000 |
| Subject: | Re: Cookie with Netscape | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37272@lists.php.net to get a copy of this message | ||
"Eugene Yi (InfoSpace Inc)" wrote:
>
> Thank you for your feedback! I tried it but it didn't make a difference. I
> printed the var right after the set and it returns null.
>
> setcookie("cbcookie1",$domain,0,"/","mydomain.com");
> $domain = $HTTP_COOKIE_VARS["cbcookie1"];
> echo "domain($domain)<br>";
ahem, I think you shall see the cookie after a round trip to the
browser.
if you set it w/ setCookie() it won't be available right away in
HTTP_COOKIE_VARS.
only on the next calls to the page, cause the client has to receive it,
accept it (eventually) and send it back. when she sends it back, it is
in fact a HTTP header,
so it will be parsed and avaiable in that http array.
-- teodor