
Originally Posted by
pmbguy [Only registered and activated users can see links. Click Here To Register...] Hi, im having a problem with deleting a cookie. when i set the cookie i set it for time()+3600 to set it for an hour... when i delete i set time to time()- 24*60*60 but cookie not deleting... i tried 0 which should drop cookie when browser closes n still nothing... i am now clueless as to whats going on...
Try the time in sec, it shud work
PHP Code:
setcookie('user', 'someone', time() - 2592000, '/');
Added after 2 minutes:
if you wana to let cookie expireswhen the browser is closed, skip the time() param
PHP Code:
setcookie('user', 'someone');
Bookmarks