[PHP] Wierd cookie behiavor

2001-07-11 Thread david jarvis

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



RE: [PHP] Wierd cookie behiavor

2001-07-11 Thread scott [gts]

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:[EMAIL PROTECTED]]
 Sent: Wednesday, July 11, 2001 12:38 PM
 To: [EMAIL PROTECTED]
 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
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Wierd cookie behiavor

2001-07-11 Thread scott [gts]

are you setting the cookie expire time and blanking
out the cookie's value properly when the user logs off?

even if you have the user logged in, to the browser,
it's just another webpage, and the browser shouldnt
handle cookies any differently no matter what type of
HTML you give it... 

 -Original Message-
 From: david jarvis [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 11, 2001 12:54 PM
 To: scott [gts]
 Subject: Re: [PHP] Wierd cookie behiavor
 
 
 hmm, still no luck.  The problem isnt that the cookie in in memory, the
 problem is that its still on the hard drive. for example: User Logs On, User
 Logs off  = cookie still on hd (even if you close the browser)  example2:
 User restarts browser, User does not log on (cookie info still on hd), User
 logs off = works fine.
 
 any ideas?
 
 - Original Message -
 From: scott [gts] [EMAIL PROTECTED]
 To: php [EMAIL PROTECTED]
 Sent: Wednesday, July 11, 2001 12:39 PM
 Subject: RE: [PHP] Wierd cookie behiavor
 
 
  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:[EMAIL PROTECTED]]
   Sent: Wednesday, July 11, 2001 12:38 PM
   To: [EMAIL PROTECTED]
   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
  
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]