Re: deleting cart items on session expire

From: Date: Thu, 15 Feb 2001 05:56:04 +0000
Subject: Re: deleting cart items on session expire
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39838@lists.php.net to get a copy of this message
You'll probably need to trigger the deletion of all expired carts with something other than trying to guess when the user closes their browser. Maybe a regular cronjob, or just do it inside your globally-included function definition script so that any hit to the website can trigger it for you, or perhaps just put it in the script that's used when creating a new cart for someone. jason ----- Original Message ----- From: "Joseph H Blythe" <joe@binarylogic.com.au> To: "php-general" <php-general@lists.php.net> Sent: Friday, February 16, 2001 3:29 PM 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

« previous php.general (#39838) next »