deleting cookies

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Nov 2008
Posts: 58
Reputation: adam291086 is an unknown quantity at this point 
Solved Threads: 0
adam291086 adam291086 is offline Offline
Junior Poster in Training

deleting cookies

 
0
  #1
Jan 27th, 2009
I am trying to delete a cookie by reseting it but it wont delete. What am i doing wrong

  1. #!/usr/bin/python
  2. import cgi
  3. import Cookie
  4. import os
  5.  
  6. def cookie_expiry_date(numdays):
  7. from datetime import date, timedelta
  8. new = date.today() + timedelta(days = numdays)
  9. return new.strftime("%a, %d-%b-%Y 23:59:59 GMT")
  10.  
  11.  
  12.  
  13.  
  14. print 'Set-Cookie: UserID=0; expires= '+cookie_expiry_date(-100);
  15.  
  16. print "Content-type: text/html\n"
  17. print "woooo"
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC