How to Create a Form: Part I

HTML forms can be used to obtain information and feedback from people who visit your Web site. Guest Book is one example of popular forms that is used almost on any personal Web site. There are two major steps in processing data from visitors:

1. First, create a form to obtain desired data from visitors.
2. Second, write a script to process data from the form. A script is a program written in particular computer language, such as in Perl and C languages. The output from such that script is delivered to you by e-mail or stored in a database or a text file, for example.

In this article, we will walk you through the steps in creating an HTML form. We begin first with detailed explanation about some useful HTML form tags and examples.

1.Some Useful Form's Tags
a)<FORM></FORM>
This pair of tags begins and ends any form definition. Other form elements are contained within this pair of tags. There are two important attributes that go between the <FORM> tag:

Example: <FORM METHOD="post" ACTION="/cgi-bin/form.pl">
The attribute ACTION points to the Perl script naned "form.pl" and this script is located in the directory cgi-bin.

b) <INPUT>: This tag is used to create many types of input, such as single lines of text, radio buttons, check boxes, and the button to submit or clear the form. Some important attributes and their values:

Example: To create an input field that accept password from visitors.
<INPUT TYPE="password"  NAME="secret_word" SIZE="30" MAXLENGTH="30">