Using Webform.cgi

Contents of this Page

Introduction
The Steps
With Secure Server
Microsoft® FrontPage® 97 Users

Microsoft® FrontPage® 98 Users
Us Setting up a Form for You

Introduction

Our webform.cgi tutorial shows how to setup an HTML form to send email upon the submission of the form data.  The code calls the preinstalled script webform.cgi, which is in the "cgi-bin" directory of the server, once the web page visitor clicks on the "Submit" button. This program is a derivation of the formmail.cgi program available at Matt's Script Archive.

The Steps

To modify an existing HTML form to work with webform.cgi, please follow the simple instructions below.

We will use the example of an account with Computer Pal, Inc. with the following
account info:

Homepage name: index.htm

Name of page with the form on it: xyz.htm

Name of the thank-you page: thanks.htm

Email address:  abcdefg@xyz.com

First, we will need to make a link to "xyz.htm" from the homepage, "index.htm". The link will need to use this piece of HTML code, inserted into the file, "index.htm":

<A HREF="http://YOURDOMAIN.NAME/xyz.htm">Link to form page.</A>

We can of course substitute other words or an image for, "Link to form page." 


Second, we need to insert some HTML code into the file, "xyz.htm".    We will insert this code:

<form method="post" action="http://YOURDOMAIN.NAME/cgi-bin/webform.cgi">
<input type="hidden" name="recipient" value="abcdefg@xyz.com">
<input type="hidden" name="redirect" value="http://YOURDOMAIN.NAME/thanks.htm">
<input type="hidden" name="subject" value="Form Submission">

Of course, we may we may replace "Form Submission" with some other subject.

Microsoft® FrontPage® 97 Users

Microsoft® FrontPage® 97 users should follow a different tutorial.  Please click here.

Microsoft® FrontPage® 98 Users

It is recommended that Microsoft® FrontPage® 98 users use a Microsoft® FrontPage® 98 -based form instead.  The Microsoft® FrontPage® 98 Form WebBots have much greater functionality.  For more info, click on the word, "Help" on the menubar of Microsoft® FrontPage® 98 Editor.  Then select "Microsoft® FrontPage® 98 Help".  Click on the "Index" tab.  In the box, type "form".  You will see a list of relevant topics.