Hi
I have a function to check if a cookie is set.
The cookie is set in interact/poll.php with the command
setcookie ("oxygenpoll",poll1,time()+1536000);
The function hasvoted then checks to see if the user has voted in poll1
function hasvoted(){
if ($_COOKIE["oxygenpoll"] == "poll1"){
$hasvoted="true";
}
else {
$hasvoted="false";
}
return $hasvoted;
}
This returns false everywhere except where the cookie was set, because I can't get $_COOKIE["oxygenpoll"] anywhere other than on the page the cookie was set, everywhere else can't get the value of the cookie, any ideas?
Many thanks,
ucbones