The problem is that it is too far in the future.

Your cookie is set to expire in the year 2280. You think that's a little
overkill?


And it runs into the UNIX-style Y2K problem which is...um...13 years from
now? Well anyway...

Make your cookie's expire time a little more reasonable. Like 5 years from
now, which is this many seconds:
157680000

So set it to time()+157680000

If someone has your cookie on their machine in the year 2280 and gets pissed
that their login failed when it shouldn't of, don't worry about it. You'll
be dead, too feeble to care, or a god for creating an application that still
works after 270 years ;P


--
Plutarck
Should be working on something...
...but forgot what it was.


""Jeff Oien"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> This code won't set a cookie. I took the time part from a past
> post to set the time for waaaay ahead. I must be doing it wrong
> though:
>
> $time = time();
> $cookie_name = "auth";
> $cookie_value = "ok";
> $cookie_expire = "$time*3";
> $cookie_domain = "";
> setcookie($cookie_name, $cookie_value, $cookie_expire, "/" ,
$cookie_domain, 0);
>
> Thanks.
> Jeff Oien
>
> --
> 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