Tech Support Topics

Sphynx Site CGI

Simple Formmail CGI for Sphynx Site Users

This Perl script takes the input from a web-based fill-out form on your site and processes the contents. It emails the results of the form to your choice of email addresses and then returns the user a "thank you" page.

HTML Source to call "formmail.pl" - Write your initial "form" statement thus:
   <form method="POST" action="/cgi-bin/formmail.pl">

The initial slash represents server root, which is not your root directory but the root http directory of the Sphynx server you are on.

Create a form, the contents of which you would like mailed to some address, any address. The form should include the following fields:

recipient = specifies who mail is sent to
username = specifies the remote users email address for replies
realname = specifies the remote users real identity
subject = specifies what you want the subject of your mail to be
You can include as many additional fields as you would like. For example, the HTML source for your form may look like this:
   <form method="POST" action="/cgi-bin/formmail.pl">
   <input type="hidden" name="recipient" value="your-id@sphynx.com">
   <input type="hidden" name="subject" value="Send Me Info">
   Please Enter Your Name:<br>
   <input name="realname" size="40">
   <p>
   Please Enter Your Email Address:<br>
   <input name="username" size="40">
   <p>
   Please Enter Comment:<br>
   <input name="comment" size="40">
   <p>
   .etc.
   .etc.
   .etc.
   .etc.
   .
   .
   <input type="submit" value="Submit">
   <input type="reset" value="Reset">
   </form>

After the visitor to your site submits a filled out form, a default "Thank You" html page will be sent to his or her browser with all items listed on the page.


If you are unfamiliar with the FORM HTML element, or would like to learn more about forms, try this excellent resource from NCSA.




HOME | SITE HOSTING | VIRTUAL SERVERS | PAGE DESIGN | FAQ | ORDER | TECH SUPPORT


Copyright © 1996, Sphynx Web Solutions. All rights reserved. All brand names and product names used on these web pages are trademarks, or trade names of their respective holders. Direct questions or comments to webmaster@sphynx.com.