Hi there,
I am using code to submit data to a php script which uses a switch case statement to peform certain things depending on which submit button is pressed and the value passed by that button. I was using code similar to this:
<form action="" method="get">
<input type="submit" name="submit" value="data">
</form>
result is: http://webserver/submit.php?submit=data
This was working fabulously, but I decided to be ambitious and replace the ugly submit buttons is some nicer images. So I replaced the code above with this code below:
<form action="" method="get">
<input type="image" src="go.gif" name="submit" value="data">
</form>
BUT, the result is this:
http//webserver/submit.php?submit.x=7&submit.y=6
not this:
http://webserver/submit.php?submit=data
as expected.
I looked this up in a few PHP and HTML books, but all seem to avoid suggesting ways to mimic the results of a button submit with an image submit.
Is there a way that this can be done? Or is there a way I can around this and still use my image buttons?
Thanks
Owen