|
Posted by nettleby on 04/17/06 14:25
I'm just learning about forms and the submit process. One thing I'm
confused about is: if there are two submit buttons on a page, then is
it necessary to have a name for both buttons, or just for one, in order
that the server can differentiate between the buttons?
for example:
<form action="http://www.htmlcodetutorial.com/cgi-bin/mycgi.pl">
Firstname:<input type="text" name="fname">
<br>
Surname:<input type="text" name="sname">
<br>
<input type = "submit" value="Update"/>
<input type = "submit" value="Reset" name = "reset"/>
</form>
You would get two different strings being submitted here, for the two
buttons. Is this a valid way of doing things?
Thanks
Navigation:
[Reply to this message]
|