Clicking a submit button (Figure 68.11) sends off the data of the form for processing. Where the form data goes appears in the form tag's action attribute, and how the form data goes appears in the form tag's method attribute. Listing 68.11. View Source for Figure 68.11.<form action="/forms/process.php" method="POST"> <input type="submit" name="formSubmit" value="Submit Form"> </form> Figure 68.11. A submit button sends the form data to the Web server for processing.In this example, clicking the submit button sends the form data via the POST method. The submission follows the root-relative path in the action attribute, winding up on a page called process.php, which would contain server-side code for processing the form data.
As with other buttons, the text in the submit button's value attribute appears on the button's face. |