Jump to content
hariskar

PHP Example - AJAX Poll questions

Recommended Posts

Is it possible to add a 1 vote per IP restriction for this poll without using php? If not with IP restriction, how could a repeated voting of the same person be avoided?

How can a Results link be added? Where should it refer?

 

Thank you!

Edited by hariskar

Share this post


Link to post
Share on other sites

You need server-side code to identify the IP and to store the results on the server. Javascript can only store data locally.

  • Like 1

Share this post


Link to post
Share on other sites

No, because each browser stores their own cookies, and cookies can be deleted. A user would be allowed to give as many votes, at minimum, as the amount of browsers installed on their computer. If they figure out to delete the cookies they'll get unlimited votes.

Share this post


Link to post
Share on other sites

I don't think someone would do that to vote many times. I think php restrictions are not more secure, users can restart the rooter, get new IP and revote.

 

But my users are mostly anonymous, so can there be a cookie restriction for them?

Edited by hariskar

Share this post


Link to post
Share on other sites

If you already use IP restrictions you could certainly add cookies, or limit polls to e-mail verified users, or perhaps use 3rd party logins.

Share this post


Link to post
Share on other sites

OK, thank you, polls work OK now, I don't want to add something in my php polls, I just thought if I could substitute them with AJAX-Javascript polls but not I know that this is not possible.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×