i have created this web page with html and php where i need to set cookies to block users voting more then once i have used something like this code:

if (isset($_COOKIE["x"]))
{
        echo "You've already voted once!<br><br>";
}

but it doesnt work can any one help plz :) :) :)

i had this same problem. make sure to set the TTL in your call to setcookie().

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.