I am using multiple image select buttons in a form like the following.
<input type='image' action='submit' name='LoginUser' src='images/Login.jpg' border='0'>
<input type='image' action='submit' name='EMailUser' src='images/emailPassword.jpg' border='0'>
With a normal type='submit' button you can see which button is pressed with an
if ( isset ($LoginUser) ) {....
call. Unfortunetly this doesn't work with image select buttons. Instead of creating a global variable $LoginUser, PHP creates 2 global variables in the form $LoginUser_xnn and $Login_User_ynn, where nn is the cooordinates of the image. No $LoginUser variable is created so I can't usr the isset() function to see which was pressed.
One way I can find out which is pressed is to iterate through the $GLOBALS array until I find a variable in the form $LoginUser_x or $LoginUser_y.
I can't help thinking that there should be a better way to do this. Any suggestions?
Thanks.