![](images/banners/gathering_information_forms.jpg)
![](images/banners/how_forms_work.jpg)
It is important to note that:
- An HTML form is part of a Web page that includes areas where visitors
can enter information to be sent back to the author or publisher of
the Web page.
- A special form processing program or script (e.g., process.pl, see
HTML Form Basics) is normally required
to process the form data received.
- Rather than sending the form data collected to a special processing
script, the form data can also be sent to a specified E-mail address.
![](images/banners/email_form_data.jpg)
The following code demostrates how to send form data to a specified e-mail
address (e.g., tswong@wong-sir.com).
<HTML> <HEAD> <TITLE>Enter the Page Title
Here</TITLE> </HEAD> <BODY> <H2>Feedback
Form</H2> <FORM method="post" action="mailto:tswong@wong-sir.com">
User name: <INPUT type=text name="username" size=25
maxlength=50 value="Enter your E-mail here"> <P>Password:
<INPUT type=password name="password" size=25 maxlength=8></P>
<P>Sex: <INPUT type=radio name="sex" value="male"
CHECKED>Male <INPUT type=radio name="sex" value="female">Female</P>
Your Class: <SELECT name="class"> <OPTION
value="form1" selected>Form 1 <OPTION value="form2">Form
2 <OPTION value="form3">Form 3 <OPTION
value="form4">Form 4 <OPTION value="form5">Form
5 <OPTION value="form6">Form 6 <OPTION
value="form7">Form 7 </SELECT> <P>Your
Favorite Color(s):<BR> <SELECT name="color"
size="4" multiple> <OPTION value="red"
selected>Red <OPTION value="yellow">Yellow
<OPTION value="blue">Blue <OPTION value="white">White
<OPTION value="black">Black <OPTION value="other">Other
</SELECT></P> <P>Which Web page authoring tool(s)
are you using now?</P> <INPUT type=checkbox name="notepad"
checked>Notepad<BR> <INPUT type=checkbox name="dreamweaver"
checked>Macromedia Dreamweaver<BR> <INPUT type=checkbox
name="frontpage">Microsoft FrontPage<BR> <INPUT
type=checkbox name="golive">Adobe GoLive<BR>
<P>Please take a moment to tell us your comments and suggestions
about our Web site.<BR>
Your feedback will be highly appreciated.</P> <TEXTAREA
name="feedback" rows=10 cols=60 wrap=virtual>
Enter your feedback here... </TEXTAREA> <INPUT type="hidden"
name="teacher" value="wongsir"> <P><INPUT
type=reset value="Clear Form"> <INPUT type=submit
value="Submit Form"></P> </FORM>
</BODY> </HTML> |
However, this approach only works when visitors submitting the form have
already configured their email clients (e.g., Microsoft Outlook Express)
properly.
![](images/banners/further_readings.jpg)
![](images/back.jpg) ![](images/table_contents.jpg)
|