Re: Setting cookie on first visit

From: Date: Wed, 02 Mar 2005 16:26:07 +0000
Subject: Re: Setting cookie on first visit
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-209810@lists.php.net to get a copy of this message
The manual detail this issue: http://ca.php.net/setcookie You can't see the cookie until you hit the next page. There is no way view the newly set cookie. Dan Tappin On Mar 2, 2005, at 2:18 AM, Tom Whitbread wrote:
I am using a cookie to detect what skin a user wants to display. The problem is if a user visits the site for the first time the cookie is not being set. I am detecting if its being set or not with if(!isset($_COOKIE['skin'])){ ... } It's not setting the cookie untill a user refreshes the page once. How can I ensure it's set when it hasnt been set before? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#209810) next »