CSPP552: Web Programming, Forms part 5
Form values
- Input passed back to the server done with `values'
- Put the value in the tag with the value attribute:
<form method=get>
Pick one:<br>
<input type=radio name=foo value=highliner> Metra Highliner<br>
<input type=radio name=foo value=ssemu> South Shore Line EMU<br>
<input type=radio name=foo value=fse412> FS E412<br>
<input type=radio name=foo value=gg1> PRR GG1<br>
<input type=submit value="Show it">
</form>
- The name attribute of the <input> tag is essential;
it must be unique for each for element (radio buttons here make up
one element)
- Also note the new attribute for the <form> tag
Next