Being my first encounter of the cookie kind, i can set a cookie, i can read from a cookie, i can modify a cookie, but i cannot seem to destroy it.
this is the code that creates/adds to the cookie
header("Pragma: no-cache");
header("Cache-Control: no-cache, must-revalidate");
// put data into cookie if action =
if ($action == "addto"){
$cookie_idx = count($TestCookie2);
$cookie_idx++;
setcookie ("TestCookie2[$cookie_idx]", "$item|$cat|$sec|1.00",time()+1800,"/");
}
now to delete it i have tried using the documented cookie deletion techniques. :-
setcookie(TestCookie2);
setcookie("TestCookie2");
setcookie('TestCookie2');
setcookie("TestCookie2","", time() - 1800);
Could some one please tell me where i am going wrong?
Many Thanks
Jon Webb