image button problem
| From: | Abdul-wahid Paterson | Date: | Tue, 12 Aug 2003 13:45:30 +0000 |
| Subject: | image button problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-159277@lists.php.net to get a copy of this message | ||
Hi,
I am trying to create an HTML form that has several image buttons on it
and the resulting action depends on which button is pressed.
I first tried using <input type="image" name="test" src="....">
but from
IE on the PHP side I only get $_POST['test_x'] and $_POST['test_y']
defined. I therefore don't know which of the buttons on the form was
actually pressed.
I then tried using the <button type="submit" name="test"
value="mytest"><img src="..."></button>
The buttons render fine but when pressed I get $_POST['test'] being the
HTML code between the <button></button> tags and not the value="mytest"
that I defined. (In Mozilla I get the result as expected).
Is there are a better way of doing this? All I want is to know which
button has been clicked on the form. (The form has to be method=POST)
Regards,
--
Abdul-Wahid Paterson
Lintrix Networking & Communications ltd.
Web: http://www.lintrix.net/
Tel: +44 20 8904 2348
Email/Jabber: aw@lintrix.net
--------------------------------------------------------------------
Web-Hosting | Development | Security | Consultancy | Domains
--------------------------------------------------------------------