Re: Cookie Help
| From: | Richard Baskett | Date: | Tue, 14 Aug 2001 01:28:51 +0000 |
| Subject: | Re: Cookie Help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62545@lists.php.net to get a copy of this message | ||
header("Set-Cookie: cookiemonster=$cookiedata; expires=$expire; path=/;
domain="domain.com", secure);
or go to http://home.netscape.com/newsref/std/cookie_spec.html
to view even
more specs on it. I just found this way of setting cookies to always work
compared to the php setcookie command which didnt always set on all
platforms and browsers. I hope it helps!
Rick
> Hi, I have a problem with setting cookies...I am able to set cookies and
> retreive the information when using IE but not netscape. I'm not totally
> sure what the problem is. Here is the syntax that I am using, any
> suggestions are welcomed.
>
> $cookiedata = "Mmmm";
> $time = mktime()+900;
> $expire = date("l, d-M-y H:i:s", ($time));
> setcookie("cookiemonster", $cookiedata, $expire, "/",
> "domain.com.", 1);
>
> It needs to be secure, hence the 1. Also, I need the domain to be
> "domain.com" and it cannot be www.domain.com. Can anyone help me at all?
> Thanks!
>
> Max