HTML and Forms

Ok, im creating a form and I need to find a way so that each user can only submit the form once. The form is an annonymous survey.. So how could I do this? Maybe using cookies? or is there a better way to do this?
 
The best way without having them create some sort of account with a unique email that they have to verify would be to store the IP address they used in a database of some sort (which I assume you have anyway to store the results). Storing a cookie can be hit and miss especially if someone doesn't have them turned on or clears their cache. There really isn't any way to guarantee that somone won't spoof their IP address and submit multiple results. The only really reliable way is to have them sign up for an account with you and then you send them an email with a link to a customized survey page. If they wanted to submit another survey they'd need to get another working email. And if you combined this with the IP check that should be about as good as you can get.
 
Yeah the IP solution on it's own is problematic - dial-up users get a different IP each session, for example. Maybe you could rig some system that involves requesting the survey in with a valid email address, sending a link to that email address and maintaining a list of used email addresses. It's probably a lot of work, though and I think you're looking for an easy solution to a seemingly easy problem.

Unfortunately, the 'net just ain't built like that...
 
Well the form is for my a city municpality and my school. They want to have a form for residents and those that own a business to fill out rating certain aspects of the city.. ie importants of job growth and what not. One of the main features of this form is for it to keep the user annonymous.. so i guess maybe ill have to test a couple of different ideas given here and check around.
 
Well you could ask for some sort of code that each person gets in the mail. Once a code is used that person cannot submit a specific form again. The trick is that you want it to be annonymous. The easiest solution is to have two tables in your database (which I am still assuming you have). One table would store the results and the other would store which surveys have been used by which code. The trick is that neither of the two tables contains anything that could match the info in the other. So the survey results couldn't be matched to a specific person.

What you use for the code is up to you. But it should be something easy to transmit to the person and unique enough that random guessing wouldn't work easily.
 
Back
Top