Flying Lemurs: Fly for Fun

TUTORIALS

Forms Web Page
The forms page allows access to cgi, the Common Gateway Interface. This form uses the simple "formmail.cgi" program that takes text "inputs" such as "firstname" and "lastname" and other types of configurable text entries and load this data into the email format, sending it to the "recipient" email address.
View the code for the following form by going to "View->Source"


First name:
Last name:
Subject:

The form is given an action and method:
<form action="http://www.flyinglemurs.com/cgi-sys/FormMail.cgi" method="post">

In this case the action is to use the FormMail.cgi script that exists in the cgi-sys folder. This script will read the form input and create an email that is sent to the recipient:
<input type=hidden name="recipient" value="recipient@flyinglemurs.com">

A couple of input fields could be "First Name" and "Last Name":
First name: <input type="text" name="firstname">
Last name: <input type="text" name="lastname">

The Subject of the email will be filled with this input field:
Subject: <input type=text name="subject">

We name the text data, "thetextiamsending" and there could be other text data input with other names:
<textarea name="thetextiamsending" rows="8" cols="80></textarea>

Finally, the input type is "Submit" and this gives the form a "Submit" button with the action of initiating the form data into the cgi script:
<input type="SUBMIT" value="submit"> </form>

 

Copyright 2008 Flying Lemurs.