You need to set the expire time.  Set it to 10 years in the future or
something.

$expire_time = time() + (86400 * 365 * 10);
setcookie("cookie", "value", $expire_time);

Cheers,
Kelly.

> -----Original Message-----
> From: Jay Paulson [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 14 September 2001 6:13 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] easy cookie question
>
>
> How do you set a cookie not to ever expire even after the browser
> is closed?
>
> I've tried the following:
>
> setcookie("cookie","value");
>
> and when you close the browser it has to set the cookie again,
> which i don't
> want it to do.
>
> Thanks,
> jay
>
>
> --
> 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]
>
>


-- 
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]

Reply via email to