I have a web poll that I would like my visitors to only take once. I think I understand the logic but don't know where to start with the code. Here is what I am thinking:
- User clicks on a link to get to the form
- A cookie is set on the users computer
- User takes the poll
- If users try to come back again and take the poll a second time
- The cookie checks against itself so see if the visitors already came
- Print out some sort of message like "Um, sorry but you can only take this poll once"
- Web poll doesn't display again.
My JS is a little rusty but I can follow along. The part I'm getting stumped on is setting the cookie and having it check itself.
P.S. Or if there is a better way, please let me know