Working with Submit Buttons
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>
[View full size image]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. | FAQHow do I process form data?Unfortunately, you need server-side scripting to process and use form data, which is beyond the scope of this humble tome.Don't send your submission to a client-side document like an HTML page or JavaScript file, because the browser won't know what to do with it. |
|
As with other buttons, the text in the submit button's value attribute appears on the button's face.