[PHP] CookieMonster
Hi Simple question I guess.. How do I set a cookie so it will never expire? (I don't want it to expire) /G @varupiraten.se -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CookieMonster
Simple question I guess.. How do I set a cookie so it will never expire? (I don't want it to expire) You can't really... I could delete it and that would be the same as expiring it... Best you can do is set it to expire 100 years in the future or some such... see the manual for SetCookie() for more info... -philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CookieMonster
You can.. Dont include the expire argument.. or set it to 0. Jason On 9/1/05, Philip Hallstrom [EMAIL PROTECTED] wrote: Simple question I guess.. How do I set a cookie so it will never expire? (I don't want it to expire) You can't really... I could delete it and that would be the same as expiring it... Best you can do is set it to expire 100 years in the future or some such... see the manual for SetCookie() for more info... -philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CookieMonster
Jason Davidson wrote: You can.. Dont include the expire argument.. or set it to 0. Jason On 9/1/05, Philip Hallstrom [EMAIL PROTECTED] wrote: Simple question I guess.. How do I set a cookie so it will never expire? (I don't want it to expire) You can't really... I could delete it and that would be the same as expiring it... Best you can do is set it to expire 100 years in the future or some such... see the manual for SetCookie() for more info... -philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php If you do that then the cookie will expire as soon as the browser session has been closed - I dont think that is what the OP wanted. As per the previous post, all you can really do is set it for some date far in the future. Mikey -- The revolution will not be sent as an email attachment. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CookieMonster
You can.. Dont include the expire argument.. or set it to 0. You sure? The manual says (last sentence): expire The time the cookie expires. This is a Unix timestamp so is in number of seconds since the epoch. In other words, you'll most likely set this with the time() function plus the number of seconds before you want it to expire. Or you might use mktime(). time()+60*60*24*30 will set the cookie to expire in 30 days. If not set, the cookie will expire at the end of the session (when the browser closes). Jason On 9/1/05, Philip Hallstrom [EMAIL PROTECTED] wrote: Simple question I guess.. How do I set a cookie so it will never expire? (I don't want it to expire) You can't really... I could delete it and that would be the same as expiring it... Best you can do is set it to expire 100 years in the future or some such... see the manual for SetCookie() for more info... -philip -- 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
Re: [PHP] CookieMonster
Jason Davidson wrote: You can.. Dont include the expire argument.. or set it to 0. No. Do this, and the cookie will expire when you close the browser window. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CookieMonster
You are right, ignore my post. Jason On 9/1/05, John Nichel [EMAIL PROTECTED] wrote: Jason Davidson wrote: You can.. Dont include the expire argument.. or set it to 0. No. Do this, and the cookie will expire when you close the browser window. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CookieMonster
You can.. Dont include the expire argument.. or set it to 0. Jason Sorry for clogging your inbox, Jason, I didn't CC: the list the first time. if you don't set the expire argument (it's optional), the cookie expires at the end of the browser session. I think the best you can do is set the cookie to expire sometime well beyond the expected life of the application. Google sets their cookie expiration for 30 years. -- Thomas Dodson Programmer, Bioinformatics S-327 Ag. Science North Department of Entomology University of Kentucky Lexington, KY 40546-0091 Phone: (859) 257-3169 Fax: (859) 323-1120 Cell: (859) 420-1696 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php