"Joel" <[EMAIL PROTECTED]> skrev i en meddelelse
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
No - because it can't be done.
> I can set the cookie to expire for upto 1 hour.
> This is the code :
> That would make the cookie expire after an hour.
> How do I make the cookie not expire at all?
You can't. The closest you get to never is x years.
> If I don't mention any expiration time, the cookie expires as soon
> as quit the browser. Can I use date instead of time?
No. Setcookie requires a the time to expire in seconds:
setcookie("bookmarks","cookievalue",time()+3600*24*30*12*10); // This cookie
will expire after 10 years.
Jonas Delfs, http://delfs.dk
"Developers are being asked to do more with less, do it faster, and make it
fit with the existing systems and databases." - IDC
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]