View Full Version : To delete a cookie in a PHP page
Vidhya
05-23-2003, 11:51 AM
I want to delete a cookie using PHP when an anchor link is clicked.
i.e, I am using this link to 'Log off' the session. can anyone help regarding this? Thanks.
Nightfire
05-23-2003, 06:00 PM
Just set the cookie again with an expiry date in the past.
Fatman
05-24-2003, 12:01 PM
like setcookie("goat",-300);
Fatman
Vidhya
05-26-2003, 11:02 AM
Hi, Thankx for your reply. But the problem is ' I can't use setcookie, because I am using output'. Is there any other way for the session to be logged off?
Nightfire
05-26-2003, 11:52 AM
set the cookie before anything's outputted would be my suggestion...or simple don't set a time in the original cookie, it'll expire once the browser is closed or the site has been left, like a session
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.