GuestlistLast Updated: January 20, 2000A simple way of interacting with clients that visit a web site is to allow them to sign a guestlist and leave some comments. A small form and custom CGI can be designed to facilitate such a task. The guestlist form and CGI source are presented in three sections below.
The HTML Source for the GuestlistThe HTML source below represents the skeleton of a guestlist which will store the guest entries. It is recommended that the part of the guestlist in bold be left intact. The remainder of the page can be customized to your own liking. <html> <head> <title>Guestlist</title> </head> <body> <h3>Guestlist</h3> <hr size = 3> <p> Feel free to add your name, EMail address, and comments to the guestlist by using the Guestlist Entry Form. <p> <p align=center> <font size = "+1"><b> G U E S T L I S T </b></font> <!-- __GUESTLIST_BEGIN__ --> <!-- __GUESTLIST_END__ --> <p> <hr size = 3> </body> </html> The guestlist entries are placed between the lines: <!-- __GUESTLIST_BEGIN__ --> <!-- __GUESTLIST_END__ --> The HTML source below represents the guestlist entry form. This form can be customized for your server by simply changing the occurrence of MAXENTRIES (shown in bold) to be the number of entries that will be displayed on the guestbook. For example, if MAXENTRIES is set to 100, only the latest 100 entries in the guestbook will be displayed. If MAXENTRIES is set to negative or zero (or not included in the form at all), no entry restriction will be applied. PATHNAME represents the pathname of the guestlist file relative to the "htdocs" directory of your server. For example, if your guestlist file was named "guestlist.html" and was located in a subdirectory "guest" of your main "htdocs" directory, you would set PATHNAME to be "/guest/guestlist.html". If the file "guestlist.html" is located in your main "htdocs" directory, you would set PATHNAME to be "/guestlist.html". ADDRESS should be set to the e-mail address where a copy of guestlist entries which include a return e-mail address are sent.
<html>
<head>
<title>Guestlist Entry Form</title>
</head>
<body>
<h3>Guestlist Entry Form</h3>
<hr>
<p>
Thank you for taking the time to sign our guestlist.
Feel free to add your name, EMail address, and comments to the guestbook
by entering them in the form below.
<p>
<hr>
<form method="POST"
action="/cgi-bin/library/guestlist/guestlist.pl/PATHNAME">
<input name="recipient" type="hidden" value="ADDRESS">
<input name="maxentries" type="hidden" value="MAXENTRIES">
<font size="+1">Your Full Name:</font><br>
<input name="name" size=50 maxlength=64>
<p>
<font size="+1">Your EMail address (optional):</font><br>
<input name="email" size=50 maxlength=64>
<p>
<font size="+1">Your comments (optional):</font><br>
<input name="comments" size=50 maxlength=256>
<p>
<input type="submit" value="Sign Guestlist">
<input type="reset" value="Clear">
<p>
</form>
<hr>
</body>
</html>
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 Guestlist CGIThe source code that handles the guestlist 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 GuestlistTo install the comments form on your Virtual Server you will need to do the following:
Once you have completed the installation successfully, you will have a working guestlist form like the one shown below (go ahead and test it).
|
Copyright © 1996-2000. A 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.