Fall 1999 - Section 703 - METHOD="GET" vs. METHOD="POST"
Elaborating on GET and POST
GET
- Causes the fill-out form contents to be appended to the URL
This is the default method
Implies the form is only requesting information (for example, a file, an image, or a database query)
Form contents are passed as part of the URL, as a QUERY STRING, in the form: actionurl?name=value&name=value&name=value
Form contents are appended to the url (after the question mark) in name/value pairs
This limits the quantity of form data which can be passed
POST
- Causes the fill-out form contents to be sent to the server in the body of the message rather than as part of the URL.
Implies the form processing may update information on the server (adding or changing information in a database, placing an order, etc.)
Contents of the form are encoded exactly as with the GET method (above), but the form contents are passed to the script as an input file
As a result, much more form data can be passed, since you can't run into the limit on the length of a URL or the length of a command line or command line argument on the server
This is the recommended usage, although you must be sure your HTTP server supports the POST method.
NOTE: Some browsers, notably older versions of the America OnLine browser and Spry AIR Mosaic, mis-handle POST forms! This is an error in the browser, not the HTML, the form, or the form processing program.