method Attributemethod Attribute(get | post) - default="get":method is declared on the element: formThe method attribute is specified on the
form element
and tells the user agent which HTTP
method to use to submit the form data.
The default method
is "get" which sends the form data appended as a query string to the
URI specified in the
action attribute.
This method is good for short, simple forms which do not cause
any side-effects, such as a database modification.
The alternative method, "post",
involves the user agent first making
contact with the processing server (specified in the
action attribute)
and, once contact has been established, sending all the
form data to the server in a separate transmission.
The "post" method should be used for any request which causes side-effects,
(such as updating a database, sending an e-mail, etc.) and also
for large form data sets (e.g. those containing
textarea
elements, many fields, or files for upload - in this last case the
enctype should be set
to "multipart/form-data" as well).