coockie expiration problems
| From: | andy | Date: | Mon, 02 Sep 2002 11:00:57 +0000 |
| Subject: | coockie expiration problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-114897@lists.php.net to get a copy of this message | ||
Hi there,
I am trying to save a var inside a cookie for a certain time (in this
example 10s):
setcookie('referrer', $user_id, time()+10); //expires in one hour
Now I would like to get the value, but only if the coockie is valid (if
cockie not older than 10 s in this example)
echo 'referrer: '.$_COOKIE[referrer];
Unfortunatelly this does not work, the cockie value is always valid, even
after expiration time.
What am I doing wrong?
Thanx for any help on that,
Andy