|
Posted by petersprc on 12/07/06 19:30
Hi,
Setting the expiration time should do it. May want to double-check the
cookie path and domain.
You could also check if the client is overriding this behavior. For
example, Firefox has an option called "Keep Cookies until I close
Firefox" (Tools -> Options -> Privacy -> Cookies) which could interfere
with this.
T.Taylor wrote:
> I am using a session to store user info and a cookie to store their
> username. When the user returns to the site I would like the username
> to be loaded from the cookie but it expires as soon as you close the
> browser. How can I stop the cookie from expiring when the browser
> closes?
>
> setcookie($cookiename,$cookievalue,time()+(60*60*24*90),$cookiepath,$cookiedomain);
>
> Thanks in advance.
Navigation:
[Reply to this message]
|