How should I go about creating a point system for users like SO and yahoo answers?(PHP)
- by ggfan
I am creating a voting system for a Q&A site project in which if a user asks a question, he/she losses -5 points; answer a question +5, vote a question +1, etc. (kind of like SO and yahoo answers)
--To create the basic arithmetic, I have a "users_points" table that relates the user_id and their total points.
+---+---------+
| 1 | 100 |
+---+---------+
| 2 | 54 |
+---+---------+
--Basically if the users does certain task, it would + or - the points. How do I prevent users from say voting an answer up 100 times. ex: I want a user to be only able to vote once per question, etc.