Fail-Proof method:
The best way to control this kind of thing would be to use an image form element with the ratings on the image. When the image is clicked, the form is submitted and the XY coords of the mouse click on the image are sent as well.
For instance, let's say that the "5" rating is from (40,0) to (50,10) on the image, and they click within that area.