Re: cookie stopped working???

From: Date: Sun, 14 Jan 2001 08:00:19 +0000
Subject: Re: cookie stopped working???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34459@lists.php.net to get a copy of this message
> SetCookie("cpvin","$vin","time()+1500"); SetCookie("cpvin",$vin,time()+1500); Note though that such short expiry times make you very prone to people having their clocks set wrong. It is a better idea to embed your server's timestamp in the value of the cookie and when you get the cookie back compare that timestamp to your server's current time and determine if you shoudl expire the cookie or not. Leaving expiry to a remote user's badly configured machine is a mistake. > Today I tried putting: $cpvin = $HTTP_COOKIE_VARS["cpvin"]; at the > top.. no luck there either. Stick a phpinfo() call on your page and scroll to the bottom of the output. You will see all the incoming and outgoing headers for the request. Cookie headers will show up there. -Rasmus

« previous php.general (#34459) next »