previous | start | next

Submission Methods

The two ways in which form data can be returned to the server are METHOD=GET and METHOD=POST.
 
GET
This method is ()according to the original specification) preferred if the submission of the form is not going to have a lasting effect on the global state of the universe -- that is, it does not have side effects. For example, it may query a database, returning the result as HTML. A HTTP GET request is issued to the ACTION URL specified in the <FORM> markup tag, with the urlencoded form information appended after a separating "?" character. This can generate very long URLs.
POST
This method should be used where processing of the form is intended to have side effects, eg, updating the contents of a database. In this case, a HTTP POST transaction is performed. The "body" of the transaction contains the urlencoded form data, as a single long line of text. The POST transaction is directed at the URL specified in the ACTION attribute of the <FORM> tag.

 
In "real life", GET and POST methods are used pretty much interchangeably, depending on the programmer's or system designer's preference.
 


previous | start | next