RE: Setting cookie on first visit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When the user first visits your site, there is no skin in your cookie. Then
you can give a default value. And after the user modifies his/her profile,
you can set it to the cookie. So I don't think it is a problem of setting
cookie.

 
Best regards,
Yang Shiqi
 
 
 

-----Original Message-----
From: Tom Whitbread [mailto:tom@xxxxxxxxxxxxxxxx] 
Sent: Wednesday, March 02, 2005 5:18 PM
To: php-general lists
Subject:  Setting cookie on first visit

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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux