RE: [PHP] Wierd cookie behiavor

From: Date: Wed, 11 Jul 2001 16:39:19 +0000
Subject: RE: [PHP] Wierd cookie behiavor
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57418@lists.php.net to get a copy of this message
if you dont specify an expiration time, the cookie will hang around in memory until the browser is closed... even if it's an empty cookie. (AFAIK) if you really want it deleted, when the user "logs out" setcookie("membership", "", time()-1); that'll set the expire time to one second in the past, which (in theory :) will delete the cookie ASAP. > -----Original Message----- > From: david jarvis [mailto:david@jumpinternet.com] > Sent: Wednesday, July 11, 2001 12:38 PM > To: php-general@lists.php.net > Subject: [PHP] Wierd cookie behiavor > > > I have a logout page that sends this cookie > > setcookie("membership") > > So that "membership" shoud be empty. However, if you login so that the > cookie membership is created, and then try to logout without restarting > the browser, it wont delete the cookie. But if you restart the browser > and try to logout, it will work fine > > any ideas? > > -David >

« previous php.general (#57418) next »