I want to read a cookie, then set a variable depending on that, and if it is not present, then create that cookie on the persons system.
It is to be used for a voting system, but at the moment, it seems to return the variable as set as tho the cookie is there.
Ive used:
setcookie("s5nvote","voted",time()+3600);
to set the cookie, after
if (isset("s5nvote"))
{
$voted="1";
}
else
{
$voted="0";
}
where am i going wrong with these? i dont want to seperate them out into two files, as it will then mean that people can skip the cookie setting