Re: extend the expire time of a cookie
| From: | David Robley | Date: | Thu, 29 Jun 2000 01:58:12 +0000 |
| Subject: | Re: extend the expire time of a cookie | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3713@lists.php.net to get a copy of this message | ||
On 29 Jun, Mark Lo wrote:
> Hi,
>
> I have set the cookie to be expire after 24 hours, If people are
> not coming back then the cookie will be expired. But, I am having a
> funny questions, if people comes back at 23 hours 55 minutes later, and
> add something into their basket, then 5 minutes later, their shopping
> cart will be gone by then, becase the cookie is expired. Please tell me
> how to extend the expire time of the origional cookie if the client
> comes back within 24 hours.
>
> Thank you
>
> Mark
>
Each time they access the page(s), read the cookie; if it exists, work
out how long it has to go and extend it by an appropriate amount. Or you
could just reset it to be another 24 hours.
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA