tags:

views:

145

answers:

3

What are these x & y values that are being sent back with seemingly random values? After submitting my form, I output the _POST array using print_r() to make sure my form is being submitted properly.

Array ( 
[user] => Richard Testani 
[pass] => sdf 
[client] => Kim Ronemus Design 
[api] => 3425yrt 
[email] => [email protected] 
[x] => 88 
[y] => 34

)

I've seen this in other forms, but just ignored them. Right now Im on a Mac platform 10.5, running PHP5

Thanks Rich

+1  A: 

I had this problem. It happens because you are using an image as your submit button instead of a true submit button.

ikkebr
+4  A: 

If your input element is of type="image" (or a button element containing an image) then the coordinates of the click will be sent, cf. the specification.

EDIT If your input element had a name="something" the $_POST array would contain the keys something, something_x, and something_y.

jensgram
Thats the case - thanks for the answer. While not a huge issue in my scenario can a button element submit a form or only a submit input element?
Richard Testani
Yes, it can. Why else would you want a button (except for `type="reset"`)?
jensgram
+1  A: 

it's if submit "button" is replaced with <input type="image" src="submit.png" />

Eimantas