|
Web design and Programming Discuss website creation and other programming topics. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
unset cookie?
how do i unset a cookie(s)?
tried php's unset($_COOKIE['cook']); but it didnt work |
#2
|
||
|
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 |
#3
|
||
|
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 |
#4
|
||
|
i like panthers way better (less math involved ) anywyas, i cant believe i never thought of setting it to 0
|
#5
|
||
|
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 |
#6
|
||
|
yea you can set -1 if you'd like, dosnt really metter aslong as its a "-" figure...
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 |