as it happens the code works for me on firefox, but any issues are
possibly down to the fact that setcookie expects a string value as the value, not a boolean (true/false) so if you used !== then you check might fail
so really you should
PHP Code:
function check_cookie() {
if($_COOKIE['test'] != "someval"){
echo 'setting cookie';
setcookie("test", "someval", time()+3600);
}
}
though you could just as easily test if the cookie is set .. if(isset($_COOKIE['test'])){etc