Приглашаем посетить
Спорт (www.sport-data.ru)

Identifying Each Piece of Form Data

Previous Page
Table of Contents
Next Page

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 previously, you would see something like the following two lines in the email message you get when the form is submitted:

firstname=Jane
lastname=Doe

The following code is a sample email message generated by the form-processing script specified in the form in Listing 18.1. Notice that each data element is identified by the name given to it in Listing 18.1:

fullname=Frank Rizzo
e-address=frank@rizzoratchets.com
idiot=on
lovebest=treasures
potential=Thousands (an under-appreciated classic)
suggestion=More Elvis stuff
comments=Frankly, I could've hacked together something much better myself.

By the Way

Depending on the specific manner in which your web server processes email forms, you might see the data in a different format than that shown here.



Previous Page
Table of Contents
Next Page