Do you have your tutorials in a format where they are in a Database or at least have ID numbers for each?
If so, you can just have a little drop down, to select 1-5. You would just need two extra fields in your Tutorials database. These would be `avgrate` and `numrate`.
`avgrate` would be the average rating for the tutorial, such as average of 4.333.
`numrate` is the number of people who rated the tutorial.
For the code where someone votes on it, you will need a database to keep track of who has voted already (by Username, or IP)
Anyways, here is how the voting code would go:
`numrate` = 5
`avgrate` = 4.0
Do a check to see if they have already voted, if not:
Take `avgrate` times `numrate`. This will give you the sum of the numbers people have entered in. Then you add the user who voted's sum, lets say it is 5.0. So it is 5*4 = 20, then 20+5 = 25.
Add one to `numrate`, and then divide 25 (the new sum) by the new `numrate`. 25 / 6. That would give you the new rating, which you would update into the database under `avgrate`. Then their vote would be counted. Pretty simple concept, the only complex part would be if you didnt already have the tuts IDed or in a SQL database. It might take a little time to do the duplicate check, too, but that would just be a database that looks like this:
Database `whorated`
`username`
`tutorial`
Then when the person votes, it adds into that database, their username (can be replaced with IP if you want public rating) and which tutorial they rated. Then when they try to do it again, it finds a row with the same Username/tutorial and disallows them from rating again.
Oh well, its the outline of the code, it should be very easy to do as long as you know what you are doing.
Sekkusu
___________________
Swastika/Sauvastika: 1 2 3 4 5 6 7 8 9