Re: deleting cart items on session expire

From: Date: Thu, 15 Feb 2001 13:10:58 +0000
Subject: Re: deleting cart items on session expire
Groups: php.general 
Request: Send a blank email to php-general+get-39893@lists.php.net to get a copy of this message
Well, why not store the item's in the session-var? When the session dies because of timeout or user-intervention, the items dissapear too. Or store a timestamp along with the items, and refresh the timestamps as needed. Then put in a cron-job to delete out-of-date items left in the DB at regular intervals. -J 17.02.01 02:29:04, Joseph H Blythe <joe@binarylogic.com.au> wrote: >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 (#39893) next »