Hey, I read through your tutorial and it is great, i understand exactly what you are trying to teach people and the purpose of it.
Only problem i have...its only half of what I need.
You explained how to add votes and how to display the images, but, the system you wrote is for voting singular items only.
What I am trying to accomplish is a voting system that after a user votes (based on logins that I have setup and are completely functional), they cannot vote anymore (done), and say you go to the index of the rating section, you have an area like Top 10.
The only way with your system to accomplish this is to compare the rating right? That would work, but say if there is vote rigging happening, it would be very hard to get rid of someone's vote and get the rating to be what it would be without that vote.
What i did, instead of a rating/num_votes is create a table where it stores the film_id (its for a online cinema), user_id, timestamp and ofcourse their vote. I have it showing up properly if they voted or not...what their vote was etc.
All that i need if you can help is...how could I add all the votes of specific film_id, and divide that with all votes totaled from all film_id's, to give me a rating/placement. ie, ranked 4th of 100 etc.
I've been trying to write this voting thing alone for about 3 weeks now, and only have it half done, but not the display part of it. Your voting system helped me with the images part, cleared up some function issues and explained how to make a rating system work with session_id's.
If you could help or know of a place where it is explained how to do this, it would be greatly appreciated.
Thanks