i've tested this code...
if(empty($enabled))
{
$page="$PHP_SELF?enabled=yes";
header( "Location: $page");
setcookie("testingforcookies", "yes");
}
else
{
if(empty($testingforcookies))
{
echo "Couldn't set cookie. You should prabably enable cookies...";
}
else
{
echo "Cookies are enabled!";
}
}
...and recogniced that my browser shows "Cookies are enabled!" only the second time when I load the page.
I try to code a procedure to check for cookies enabled. I need it for a voting system, so any comments for these topics are welcome.
thanks... shodan