Sams Teach Yourself HTML 4 in 24 Hours

Sams Teach Yourself HTML 4 in 24 Hours

By Dick Oliver

Identifying Each Piece of Form Data

No matter what type an input element is, you must give a name to the data it gathers. You can use any name you like for each input item, as long as each one on the form is different. When the form is sent to you (or to your form-processing script), each data item is identified by name.

For example, if someone entered Jane and Doe in the text box defined under Text Input previously, you would see something like the following two lines in the email message you get when she submits the form:

firstname=Jane
lastname=Doe

Figure 8.4 is a sample email message generated by the form-processing script specified in the form in Figure 8.3. Notice that each data element is identified by the name given to it in Figure 8.1.

08fig04.gif

Figure 8.4 Clicking the Submit button in Figure 8.3 causes this information to be sent to me@mysite.com by the /htbin/generic form-processing script.

Share ThisShare This

Informit Network