View Single Post
  #10 (permalink)  
Old 10-07-03, 05:16 PM
the|Skrilla the|Skrilla is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Louisiana, USA
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
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.

Code:
<input type="image" src="image.gif" name="hsrate">
Code:
if ($_POST['hsrate_x'] >= 40 && $_POST['hsrate_x'] <= 50 && $_POST['hsrate_y'] >= 0 && $_POST['hsrate_y'] <= 10)
{
    // Do some stuff...
}
__________________
Lead Level Designer - Liquid Element

Last edited by the|Skrilla; 10-07-03 at 05:27 PM.
Reply With Quote