| |
Comments Form and CGI
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.
Installation
To install the Comments CGI, do the following:
Install the Comments Form
You will need to download the
Comments Form HTML source
and store it somewhere in your ~/www/htdocs directory structure. This form can be
customized for your server by simply changing the occurrences of the e-mail address
(EMAIL@YOUR-DOMAIN.NAME) to the address that you would like to use in the form.
Install the Comments CGI
Connect to your Virtual Private Server via Telnet or
SSH and issue this command:
% vinstall comments
This will install the comments.pl and util.pl files in your
~/www/cgi-bin/library/comments directory.
Customize the Comments CGI
Two subroutines in the util.pl file, print_header_info and
print_footer_info, are used to print out header and footer information. 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.
Configuration
You must add to the list of e-mail addresses that will receive e-mail from the Comments CGI to the
@recipients_ok array. This will prevent the Comments CGI from sending unauthorized messages
to a recipient other than the one intended.
@recipients_ok = ('EMAIL@YOUR-DOMAIN.NAME', 'EMAIL@YOUR-DOMAIN.NAME');
Substitute the e-mail addresses for EMAIL@YOUR-DOMAIN.NAME above.
Example
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 E-mail address so we
can reply to you.
|
More Information
If you are unfamiliar with the <FORM...> HTML element, or would like to learn more
about forms, the following URL is an excellent resource:
|