Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-04-2003, 01:05 PM
BeBop is offline BeBop
Registered User

Join Date: Jun 2002
Posts: 600

Send a message via ICQ to BeBop Send a message via AIM to BeBop Send a message via Yahoo to BeBop
unset cookie?

how do i unset a cookie(s)?
tried php's unset($_COOKIE['cook']); but it didnt work
Reply With Quote
  #2  
Old 10-04-2003, 02:07 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

Use set cookie again, just dont put your values in there.

Set cookie:

SetCookie("cook",$value);

Unset Cookie:

SetCookie("cook",0);

http://us4.php.net/manual/en/function.setcookie.php
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #3  
Old 10-04-2003, 04:01 PM
SilentTrigger is offline SilentTrigger
-1PARA-

Join Date: Sep 2002
Location: Sweden
Posts: 3,972

if you mean delete then
you can set the time "time()" to before ie "time()-3600" instead of the usual "time()+3600" (which would be one hour 3600 sec/60/60 = 1 hour) as described in the link panter posted
__________________
-1PARA-AlexKall

My photography website



Reply With Quote
  #4  
Old 10-04-2003, 09:18 PM
BeBop is offline BeBop
Registered User

Join Date: Jun 2002
Posts: 600

Send a message via ICQ to BeBop Send a message via AIM to BeBop Send a message via Yahoo to BeBop
Confused

i like panthers way better (less math involved ) anywyas, i cant believe i never thought of setting it to 0
Reply With Quote
  #5  
Old 10-04-2003, 10:44 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

Silents way is pretty easy also.. not much math involved..

SetCookie("cook", $value,time()-300);

time()-300 just means the cookie has already expired, 300 seconds ago.
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #6  
Old 10-05-2003, 10:13 AM
SilentTrigger is offline SilentTrigger
-1PARA-

Join Date: Sep 2002
Location: Sweden
Posts: 3,972

yea you can set -1 if you'd like, dosnt really metter aslong as its a "-" figure...
__________________
-1PARA-AlexKall

My photography website



Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Age confirm cookie Chrispy Tech Support 7 08-30-2007 03:03 AM
Cookie time Acid Web design and Programming 9 08-31-2004 08:32 PM


All times are GMT -5. The time now is 10:03 PM.




Powered by vBulletin®