Simple Comments Form

Last Updated: January 18, 2000

A web site wouldn't be complete without some simple method of sending comments or requesting information. A small form and simple CGI can be designed to facilitate such a task. The comments form and CGI source are presented in three sections below.

  1. The HTML source for the comments form
  2. The source code for the comments CGI
  3. Installation instructions


HTML Source for the Comments Form

The HTML source below represents a simple comments form. This form can be customized for your Virtual Server (or any server for that matter) by simply changing the occurrences of COMPANYNAME (shown in bold) to the domain of your company. You will also need to create an EMail alias "info" in your "/etc/aliases" file. Please refer to Chapter 4 Section 3 of the Virtual Server Handbook for information about creating EMail aliases or simply use the iRoot Utility to interactively create the e-mail alias or e-mail mailbox.

  <html>
  <head>
  <title>Send Comments / Request Information</title>
  </head>
  <body>
  <h3>Send Comments / Request Information</h3>
  <hr>
  <p>
  Feel free to send us your comments, suggestions, and/or questions.  
  We value your input and desire to make these pages as useful as possible.  
  Please leave an EMail address so we can reply to you.
  <p>
  If your web client supports the "mailto" URL, you can use your
  <A HREF="mailto:info@COMPANYNAME.com">local mail app</a> 
  to compose and send a mail message.  Otherwise, you can use 
  the form below.
  <p>
  For those using browsers that do not support forms such as this, 
  send mail to: <em>info@COMPANYNAME.com</em>
  <p>
  <hr>
  
  <form method="POST" action="/cgi-bin/library/comments/comments.pl">
  
  <input name="recipient" type="hidden" value="info@COMPANYNAME.com">
  
  <font size="+1">Your Full Name:</font><br>
  <input name="name" size=50>
  <p>
  
  <font size="+1">Your EMail address:</font><br>
  <input name="email" size=50>
  <p>
  
  <font size="+1">The Subject of Your Message:</font><br>
  <input name="subject" size=50>
  <p>
  
  <font size="+1">Your comments, suggestions, and/or questions:</font><br>
  <textarea wrap=physical name="comments" rows=8 cols=50></textarea>
  <p>
  
  <input type="submit" value="Send comments">
  <input type="reset" value="Clear">
  <p>
  
  </form>
  <hr>
  </body>
  </html>

The form shown above represents the minimum amount of information that a coments form should contain- namely "recipient, name, email, subject, and comments". Other information can be added to the form above.... this information will also be sent to the "recipient" specified.

If you are unfamiliar with the FORM HTML element, or would like to learn more about forms, the following URL is an excellent resource:

http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html


The Source Code for the Comments CGI

The source code that handles the comments form contents is based on the post_query.c code that is provided with the NCSA httpd package, released to the public domain.

If you are unfamiliar with the CGI standard, or would like to learn more about the Common Gateway Interface, the following URL is an excellent resource:

http://hoohoo.ncsa.uiuc.edu/cgi/


How to Install the Comments Form

To install the comments form on your Virtual Server you will need to do the following:

  1. Download the Comments Form
    You will need to download the Comments Form HTML source and store it somewhere in your "usr/local/etc/httpd/htdocs" directory structure. Feel free to customize the form, add graphics etc. But be sure that the variable name for each input field is not altered.
  2. Download the Simple Comments CGI source code
    You will need two source code files: comments.pl and util.pl.

          If you are an A Little Technology Shoppe, LLC customer

    1. login to your Virtual Server.
    2. change directories to your home directory (type "cd" and hit return)
    3. type "tar -xvf /usr/local/contrib/comments.tar"

          If you are not an A Little Technology Shoppe, LLC customer (sign up!)

    1. Verify that a directory path "library/comments" exists in your "cgi-bin" area.
    2. Download the two source files into your "cgi-bin/library/comments" directory and make sure the mode is set so that they will execute (chmod +x).

  3. Customize the Appearance of the Comments CGI
    Two subroutines in the util.pl file are used to print out header and footer information. These functions are print_header_info and print_footer_info. Feel free to modify these functions such that the CGI outputs pages that are in synch with the motifs of the rest of your site.

Once you have completed the installation successfully, you will have a working comments form like the one shown below (go ahead and test it).

  • Feel free to send us your comments, suggestions, and/or questions. We value your input and desire to make these pages as useful as possible. Please leave an EMail address so we can reply to you.

    If your web client supports the "mailto" URL, you can use your local mail app to compose and send a mail message. Otherwise, you can use the form below.

    For those using browsers that do not support forms such as this, send mail to: support@littletechshoppe.com


Your Full Name:

Your EMail address:

The Subject of Your Message:

Your comments, suggestions, and/or questions:


Copyright © 1996, 1997 Last Modified: 18 January 2000A Little Technology Shoppe, LLC. All rights reserved. All brand names and product names used on these web pages are trademarks, or trade names of their respective holders.