cgi scripts
How To Get Form Results Emailed To You

One of the favourite questions on the Technical Support line is - how can I email the results of a form back to myself? Well, using a script which we have installed on our server called FormMail, it is all very easy!

What we are not going to do here, is explain what forms are. There are plenty of pages around on the Web that will tell you how to create forms.

But what we can tell you, is how to get the results of that form e-mailed to you. This means that you can set up guestbooks, registration pages, enquiry forms and collect the information through your email.

All of this is achieved by using a CGI script on our server called FormMail. It's very easy to use, but has a huge number of facilities that enable you to control exactly how your form is processed.

The Really Simple Example

Suppose you have this really simple form.

Form HTML Code

Name:

<form>
Name:<input type="text" name="Name"><BR>
<input type="submit" value="OK">
<\form>

You would send the form back to your email address by adding the following to the <form> tag:

<form action="/cgi-bin/FormMail.pl" method="post">


and by adding a hidden field (don't worry, it's dead easy) to specify the address to return it to:

<input type="hidden" name="recipient" value="myemail@waverider.co.uk">


And for the most basic use of the script, that's it! :-) So, the full coding for this form would look like this:

Form HTML Code

Name:

<form action="/cgi-bin/FormMail.pl" method="post">
<input type="hidden" 
name="recipient" value="myemail@waverider.co.uk">
Name:<input type="text" name="Name"><BR>
<input type="submit" value="OK">
<\form>

Part 2: Getting A Bit Clever