Unique IPs in a voting system

后端 未结 7 701
傲寒
傲寒 2020-11-29 10:37

I\'m creating a voting system for my PHP/MySQL website and I would like to make sure one user can only vote once. What would be a good way of doing this? So far I have thoug

7条回答
  •  孤城傲影
    2020-11-29 11:11

    Storing individual votes in the database with an IP and vote. This creates bulkiness but ensures that each user gets one vote.

    That is Good but slow than 2nd but still i recommend this.

    Storing a cookie on the user's end to check if they've voted or not. This is the most simple but obviously users can just disable cookies.

    you're right its insecure but little faster but i don't like this

提交回复
热议问题