Re: Cookie monster
| From: | Teodor Cimpoesu | Date: | Mon, 12 Jun 2000 20:13:07 +0000 |
| Subject: | Re: Cookie monster | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1660@lists.php.net to get a copy of this message | ||
Hi Brad!
On Mon, 12 Jun 2000, Brad Sacks wrote:
> I have this problem with cookies. I can't get one to set. Well it's kind
> of wierd. I am trying to build a shopping cart and I really need to set
> a user id cookie. Here is my
> code.
> if (!isset($id)) {
> srand((double)microtime()*1000000);
> $randval = rand();
> setcookie("id",$randval,time()+31536000,"/",".m29.com",0);
try appending a 'dot' after com (.m29.com.)
second, maybe you can tell how exactly are you testing for that
cookie and how you notice it's not there.
thirds, I just had some trouble with NS & cookies, when NS didn't send
cookies to a redirected location. (I think that's a weird behaviour
that made PHPLIB to go wilde trying to set a session id, resulting in >4k urls)
-- teodor