Re: Clearing cookies

2005-08-17 Thread Denzil Kruse
Okay, never mind.  There was an error elsewhere in my
code.

Denzil

--- Denzil Kruse [EMAIL PROTECTED] wrote:

 I'm still having a problem clearing the cookie, or
 at
 least with the browser realizing it has been
 cleared.
 
 What happens is this:  The cookie is set, and my
 program behaves as it is supposed to.  When I decide
 to clear it, I do it and display a form which will
 recreate the cookie once the form is filled out and
 the submit button is pushed.
 
 So it clears the cookie and displays the form.  I
 look
 under C:\Documents and Settings\Owner\Cookies on my
 local computet running the browser, and I see the
 cookie disappear.  But when I press the button on
 the
 form once, the browser behaves as if the cookie is
 still set.  If I then press the button a second
 time,
 it behaves as if the cookie isn't there (correctly).
 
 I do have an apache rewrite rule in effect, maybe
 that
 is causing it to have to do it twice?
 
 Denzil
 
 
   
 
 Start your day with Yahoo! - make it your home page 
 http://www.yahoo.com/r/hs 
  
 
 -- 
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 http://learn.perl.org/
 http://learn.perl.org/first-response
 
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Clearing cookies

2005-08-16 Thread Denzil Kruse
Hi all,

I'm trying to clear a cookie using CGI::Cookies, and
can't seem to do it :(

if ($clear_cookie eq 'yes') {

 my %cookies = fetch CGI::Cookie;

 print getting cookiebr;

 if ($cookies{'id'}) {

  print clearing cookiebr;
  $cookies{'id'}-expires('-1s');
  print cleared cookiebr;
 }
}

I'm getting the cleard cookie message, but it is
still there.

Denzil




Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Clearing cookies

2005-08-16 Thread Wiggins d'Anconia
Denzil Kruse wrote:
 Hi all,
 
 I'm trying to clear a cookie using CGI::Cookies, and
 can't seem to do it :(
 
 if ($clear_cookie eq 'yes') {
 
  my %cookies = fetch CGI::Cookie;
 
  print getting cookiebr;
 
  if ($cookies{'id'}) {
 
   print clearing cookiebr;
   $cookies{'id'}-expires('-1s');
   print cleared cookiebr;
  }
 }
 
 I'm getting the cleard cookie message, but it is
 still there.
 
 Denzil
 

To clear the cookie in the user's client (browser) you have to set the
cookie again by printing it in the response headers. You are only
setting the local expiration, to have that maintained across the rest of
the session you have to tell the browser about it, which is done by
passing it back as if you were setting it initially.

HTH,

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response