![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
input type="submit" name="submit" value="x" input type="submit" name="submit" value="y" |
|
I can sy on the next page If ($_POST['submit'] == x) |
|
but if I use input type="image" name="LogOn" src="images/Submit.gif" alt="Log On" I can't do this as <image> has no value="" in this case? |
#3
| |||
| |||
|
|
Scripsit Paul: input type="submit" name="submit" value="x" input type="submit" name="submit" value="y" Even this is risky if you have a text input field in the form, too. What happens when the user hits Enter in a text input field? Browsers may act if a submit button (which? maybe a third one, anonymous) had been used. Do you know which of the submit buttons the user _wanted_ to use?` Conclusion: Use radio buttons for selecting an operation, and use just one submit button. Or maybe two separate forms. I can sy on the next page If ($_POST['submit'] == x) That's PHP, right? but if I use input type="image" name="LogOn" src="images/Submit.gif" alt="Log On" I can't do this as <image> has no value="" in this case? You can't. Conclusion? Don't use image submit buttons. They're poor usability anyway. They indicate that the designer thinks of his esthetic preferences more than users' ease of use, including the recognizability of buttons as buttons. But if you decide to use an image submit button, and you use PHP, you need to test for the existence of $POST[LogOn_x]. Ref.:http://fi2.php.net/manual/en/faq.htm...tml.form-image -- Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/ |
![]() |
| Thread Tools | |
| Display Modes | |
| |