|
<INPUT ...>VALUE VALUEVALUEVALUE
| this code | produces this |
<FORM ACTION="/cgi-bin/mycgi.pl"> name: <INPUT TYPE=TEXT NAME="realname" VALUE="wisnesky"><BR> password: <INPUT TYPE=PASSWORD NAME="realname" VALUE="pacman"> <P><INPUT TYPE=SUBMIT VALUE="submit"> </FORM> |
It's a bad idea to send a default password, because the password can be obtained by looking at the HTML code.
NAME
| this code | produces this |
<FORM ACTION="/cgi-bin/mycgi.pl"> <INPUT TYPE=RADIO NAME="color" VALUE="red" >Red<BR> <INPUT TYPE=RADIO NAME="color" VALUE="green" >Green<BR> <INPUT TYPE=RADIO NAME="color" VALUE="blue" >Blue<BR> <INPUT TYPE=RADIO NAME="color" VALUE="purple" >Purple <P><INPUT TYPE=SUBMIT VALUE="submit"> </FORM> |
VALUE
| this code | produces this |
<FORM ACTION="/cgi-bin/mycgi.pl"> <INPUT TYPE=BUTTON VALUE="My Plain Button" ><P> <INPUT TYPE=RESET VALUE="My Reset Button" ><P> <INPUT TYPE=SUBMIT VALUE="My Submit Button" > </FORM> |
If you can use the NAME
| this code | produces this |
<FORM ACTION="/cgi-bin/mycgi.pl"> Go to the check-out page? <BR> <INPUT TYPE=SUBMIT NAME="checkout" VALUE="YES"> <INPUT TYPE=SUBMIT NAME="checkout" VALUE="NO"> </FORM> |
See RADIO for more details.
VALUECHECKEDVALUEyessireebob you could set the checkbox like this:
| this code | produces this |
<FORM ACTION="/cgi-bin/mycgi.pl"> <INPUT TYPE=CHECKBOX NAME="join" VALUE="yessireebob"> yes, sign me up! <P><INPUT TYPE=SUBMIT VALUE="join"> </FORM> |
If the checkbox is not checked, no value of any kind is sent to the server. By default, checkboxes send on.
| this code | produces this |
<FORM ACTION="/cgi-bin/mycgi.pl"> <INPUT TYPE=HIDDEN NAME="threadID" VALUE="1295"> <P><INPUT TYPE=SUBMIT VALUE="submit"> </FORM> |