PDA

View Full Version : Cookies keep dying when browser is closed


Trusten
08-29-2002, 03:39 AM
I did get a page to read up about paths and cookies. Paths aren't really my problem. the problem is that once the browser is closed, then the cookies die.

what can i do?

please respond, even to tell me there's nothing i can do.

Evlich
08-29-2002, 04:22 AM
This is something that is built into cookies, all that you have to do is set a date instead of passing it a blank and it will die when that date comes no matter when the browser closes.
~evlich

Trusten
08-29-2002, 04:45 AM
are you sure? because i tried that once and it didn't seem to take. so i took it off altogether.

could you give me an example by chance?

Trusten
08-29-2002, 04:47 AM
ok, never mind, you're right.

so how do i set it for a year?

Trusten
08-29-2002, 05:00 AM
31104000

tha'ts a year, right?

if so, then you're right. that worked

*grin*

Evlich
08-29-2002, 09:41 PM
Check out this page:
http://www.php.net/manual/en/function.setcookie.php
Basicly they are showing you how you can use the time() function to set a time for the cookie to be deleted.
~evlich