Re: deleting cart items on session expire

From: Date: Thu, 15 Feb 2001 07:17:21 +0000
Subject: Re: deleting cart items on session expire
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39854@lists.php.net to get a copy of this message
I guess you will need to have a script sunning after a specific period of time which would check for the sessions that have expired and then remove the associated items from the cart. database. there is no way for you to know if the user closes the browser as php is a server side language. I may be wrong, but I this is what comes to my mind. best regards Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India ----- Original Message ----- From: "Joseph H Blythe" <joe@binarylogic.com.au> To: "php-general" <php-general@lists.php.net> Sent: Friday, February 16, 2001 10:59 AM Subject: [PHP] deleting cart items on session expire > hey all, > > I was wondering how one would suggest removing items from a cart system once the session lifetime has expired. I have it set to the default 0, which expires the session on browser close, what I want to be able to do is "delete * from Cart where session='$PHPSESSID'" when the user closes thier browser window is this even possible? maybe using register_shutdown_function or something? > > Any ideas would be great! > > Thanks > > Joseph > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#39854) next »