Form Method

Compiling Data
Passing Data
Name & Value
Muliple Elements
Variable & Value
 
Data to Popup
Data from Popup
Opener
Arrays
Form Method
 

Using the Get method submits a forms inputs name and value via the query string.

<form action="formget2.htm" method="GET">

Name = textbox value = text box

Name = radiobutton value = radio 1
Name = radiobutton value = radio 2

Name = checkbox1 value = check 1
Name = checkbox2 value = check 2


FORM has one required attribute, ACTION, specifying the URL of a CGI script which processes the form and sends back feedback. There are two methods to send form data to a server. GET, the default, will send the form input in an URL, whereas POST sends it in the body of the submission. The latter method means you can send larger amounts of data, and that the URL of the form results doesn't show the encoded form.

You can specify an encoding type with ENCTYPE, the default of "application/x-www-form-urlencoded" is most widely supported. An alternative is "text/plain", which is typically used in combination when the ACTION attribute points to a mailto: URL. If a browser supports both, the contents of the form is sent in plain text to the indicated recipient.