aliasxneo wrote:If the cookies are dissapearing then it's probably one of the following:
A) Your browser is not accepting cookies, or has some kind of settings that is deleting them
B) You are not setting a correct expiration time
The point of a cookie is for the browser to store the information on the computer and then send it again when ever a request is sent to the domain from which the cookies was originally retrieved. Therefor, exiting your browser should have no effect on the cookie unless one of the two reasons above is occuring.
Thanks for the suggestion.
A - My browser(Firefox, Opera, Safari) does accept cookies. I went to websites that are using cookies and can quit and reload with the websites remembering me. E.g. Like this forum.
B - I did set the cookie expiration time to sometime in the future. As below:
Code: Select all
setcookie('cookiename', 'cookievalue', time() + 13600)
I think there's some setting in my php.ini that I might need to set.
But I'm not really sure which one.
(By the way, I'm using Mac OS 10.5 on Apache 2.0, PHP 5.2.4)