Re: Really stupid cookie question

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

 



Brian Dunning wrote:
I am embarrassed to ask this. If I set a cookie for 30 days, and the visitor comes back 25 days later but I do nothing to re-set the cookie, will his cookie expire in 5 days, or does his browser automatically reset it to another 30 days?

That depends on if you reset the cookie when they come back or not. If your routines set the cookie only if the cookie does not already exist, then it would not reset the cookie at 25 days, so it would indeed expire 5 days after that.

If you check to see if the cookie exists first, and then reset the expiration date at that time, then the cookie would last for another 30 days...

Tim.

--
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