


In HTML, you typically use fill-out forms to collect information from the user and send it to your CGI program for processing. To construct a form in an HTML document, you use the <FORM> tag. As with many HTML tags, you need to place a beginning tag at the beginning of the form and a closing tag at the end of the form, in this case <FORM> and </FORM> respectively. More than one form can be in a single document, but forms cannot be nested.
Forms can contain single- and multiple-line entry fields, check boxes, radio buttons, list boxes, push buttons, and hidden data. Every form has a Submit button that the user can press to have their data sent to the Web server for processing. This data is a list of NAME/VALUE pairs, one for each component of the form. The NAME and, optionally, the initial VALUE of each form component is specified in the HTML code. Then the user can fill out the form and modify the VALUEs.
In addition to forms, you could create a link to your CGI program using the anchor tags (in a similar manner as described in the plug-in section 5.5.2 Using the Anchor Tags) or by listing the CGI program as a source for a frame in a frameset. However, because the preferred method of receiving information from the user is through an HTML form, this section focuses on the use of the FORM tag.
More:
8.5.2.3 Single-line entry fields
8.5.2.4 Multiple-line entry fields
8.5.2.5 Check boxes and radio buttons