Alex Rivera | Logout

Problems deleting cookies, won't unset

Asked 2010-05-18T10:32:56.327
38

I've tried searching the php manual and internet on how to delete cookies and I've tried it the exact same way they all say:

setcookie("name", '', 1);

or

setcookie("name", '', time()-3600);

But when I check the cookies in the cookies dialog in Firefox, it's still there with the same value. I set this cookie using the following line:

setcookie("name", $value, time() + 259200, $path);

I found this question on stackoverflow: , but none of the answers solved the problem. I also tried putting all paramaters in, like the author said, but it had no effect.

Does anyone see the problem?

Edit
Report

2 Answers

0

Have you tried setting the time to a small value and using a value for cookie?

setcookie("name", 'n', 1);
answered 2010-05-18T10:36:41.737
0

I sugest to using

ob_start();

at the firts l

answered 2012-11-16T07:13:19.293

Your Answer