Forum Moderators: coopster
With this button:
<input type="image" src="images/go_round_white.gif" value="go!" name="searchparties_advanced">
the variables passes are searchparties_advanced.x and searchparties_advanced.y
PHP doesn't like periods in variable names so it converts them to underscores, so in my form process page I have:
if ($_POST['searchparties_advanced_x'])
{
....MYSQL QUERY....
}
and this works fine.
However if the user hits the return or enter key to submit the form, the MYSQL query returns an error.
I tried to add a hidden field to my form like this:
<input name="alt_btn" type="hidden" value="searchparties_advanced">
and change my if statement in my process page to this:
if (($_POST['searchparties_power_x']) OR ($_POST['alt_btn'] == "searchparties_advanced"))
but it doesn't work.
How can I get BOTH the click on the image and the return/enter key to submit the form correctly?
Thanks.