Home Page

Next Page

Previous Page

Contents Page



Using Your Form

In the previous section we looked at the code needed to place a form on your web page. But the big question is how do you get to the data once the user has filled in the form? Strictly speaking, the best way is to use a CGI (Common Gateway Interface) script, probably written in a language such as Perl, contained in the cgi-bin folder of your server. However, unless you run your own server you probably don't have access to that folder -- most ISPs are very wary about letting strangers wander around cgi-bin!

To make up for this, most ISPs provide a few scripts which any subscriber can use, and many of them allow you to create your own form to use with the scripts. In this case, your ISP will be able to tell you how to get access to the script. It will probably mean putting something like this is your <FORM> tag:

<FORM ACTION="http://isp.com/cgi-bin/form.cgi" METHOD=POST>

Usually the script will take the data from the form and put it into an e-mail which will then be sent to you, so somewhere (probably in a Hidden element) you will have to include your e-mail address. Here is an example of a form provided by a service provider (it's been adapated so please don't try and use it, because it won't work!):

<FORM ACTION="/user-cgi/FormMail.pl" METHOD=GET>
<INPUT TYPE=HIDDEN name="recipient" VALUE="username@isp.com"> Please enter the subject of your mail: <BR>
<INPUT TYPE=TEXT NAME="subject"><BR>
Please enter your email address: <BR>
<INPUT TYPE=TEXT NAME="email"><BR>
Please enter the content of your email: <BR>
<TEXTAREA NAME="content" ROWS=9 COLS=45 ></TEXTAREA><BR>
<INPUT TYPE=SUBMIT> </FORM>

The form looks like this:

Please enter the subject of your mail:

Please enter your email address:

Please enter the content of your email:

If your ISP doesn't provide any scripts for you to use, all is still not lost. There are a number of places on the World Wide Web which will provide this service free of charge. One I've used myself is FreeForm (URL: http://www.note.com/success/public/freeform). The form below is one of theirs and it does work -- try it out and I will e-mail back to you a copy of the e-mail I receive from FreeForm (REMEMBER: you must put your e-mail address if you want me to do this!):



Try out the form now

Your name:

Your email address: (e.g.: you@aol.com)

Gender:  

Do you have a "Home Page" on the Internet?
Yes
No

Home Page URL:

Please indicate which of the following browsers you use:
Netscape Navigator (or Communicator)
Internet Explorer
Other browser

FreeForm
FREE feedback form powered by FreeForm
 
FreeForm

Now you've got your forms all sorted out, you are ready to go on to the last stage of the tutorial, Framing Your Site.


rule


Top of Page


This page hosted by
YOU!

 

These pages are copyright © Terry Franks May 1998.
Terry Franks

Minor revisions: 16 May 1998 at 23:17 {{GMT}}
This document URL: Local file: webintro13.html
TerryFranks is
a member of

The HTML Writers Guild