Page 1 of 1

Post voting system

Posted: Fri Feb 28, 2014 4:20 pm
by raigiano
I got a question. I used the post voting tutorial for my website, but i have one problem. The user can click more than one time on the vote link. I want to let the user just click one time on vote up or vote down. I want to ask you guys if you could help me with this. I have tried but it didn't work out as it supposed to be. Any help is welkom.

Thanks :D

Re: Post voting system

Posted: Sun Mar 09, 2014 8:16 am
by Helx
When voting, save the users IP address along with the voting data.
When the user clicks the voting button, check the users current IP with all saved IP addresses. If there is a match, don't allow the vote.

I'm sorry I can't provide you with any code, but it should be pretty basic stuff - even if you Google how to do it.

Re: Post voting system

Posted: Tue Mar 18, 2014 10:40 pm
by Temor
Helx wrote:When voting, save the users IP address along with the voting data.
When the user clicks the voting button, check the users current IP with all saved IP addresses. If there is a match, don't allow the vote.

I'm sorry I can't provide you with any code, but it should be pretty basic stuff - even if you Google how to do it.
You can do this, or if you require the user to be logged in to vote you could just put his username or id in there to see if he has voted or not. This prevents any user from logging in on another device or network / vpn / proxy and voting repeatedly.