I'm trying somewhat belatedly to implement the EU cookies law in a simple way. Each page has the code
PHP Code:
if ( !isset($_COOKIE['pcookie']) ) {
 echo 
'<div id="cookies">This website uses cookies to help make it more useful and reliable. Continued use of the site indicates that you accept this policy. <a href="cookie-off.php">Don’t show this message again.</a></div>';
}> 
and my cookie-off.php is:
PHP Code:
$back $_SERVER['HTTP_REFERER'];
setcookie('pcookie''accepted'time()*86400*365);
header('Location: '.$back); 
It works but only if I click the link about a dozen times. Is there I can do about this?