Ok i use this code to set cookies
setcookie("search", "active", time()+3600);
and i use this to delete cookies
setcookie("search", "active", time()-3600);
and i use this to check and retrieve cookies
<?
if (isset($_COOKIE["search"]))
{
if ($_COOKIE["search"] === "active")
{
echo "cookies active"."<br/>";
echo $_COOKIE["search"];
}
else
{
echo "cookies is not active";
}
}
else
{
echo "no cookies";
}
?>
but the set cookies is keep coming back again and again even if i deleted it using the method the i specify above when i refresh the page.
Am not sure why you get this error but have seen this before
Example : Calling
Only Outputs
Expected Result
Conclusion
I think you would stick to only one cookie or just remove all the cookies at once
Try
Note* Make sure
setcookieis always on top of the page and no output is before it