Forum Moderators: coopster
<?php
if(!isset($HTTP_COOKIE_VARS["theme"]))
{ echo return false; }elseif (empty($HTTP_COOKIE_VARS["theme"]))
{ setcookie("theme","classicbb",time()+2592000,"/"); echo 'cookie now set';}
?>
Try this code:
error_reporting(E_ALL);
if(!$_COOKIE["theme"])
{
setcookie("theme","classicbb",time()+2592000,"/");
echo "New cookie set";
}
else echo "Cookie already there";