Re: Cookie monster

From: Date: Mon, 12 Jun 2000 20:38:22 +0000
Subject: Re: Cookie monster
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-1665@lists.php.net to get a copy of this message
well it set the cookie, but there is no random number. Do I need to escape the random number. I know it's creates it in the IE cookie because I can see it in the database table. Brad Sacks wrote: > Thanks Teodor, > I will try that. I test for the cookie because on the next page I make a data > base insert with the random id #. That query always fail. also, I checked the query > file. I will let you know if your solutions worked. > > Teodor Cimpoesu wrote: > > > 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 > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#1665) next »