[an error occurred while processing this directive] Adding a guestbook to your web page

maplecity.com Logo


Adding a guestbook to your web page

We have provided a CGI script 'guestBook.pl' to allow users with html experience to easily add a guestbook to their web pages. You may want to refer to examples linked from the bottom of this page. (NOTE: This script is provided for use by customers of maplecity.com. It is not available for download.)

This guestbook will append lines directly to the html file from which it is called. To use this script, you must use a form and set the method to post and the action of the form to:

Because this script writes directly into the html file, the html file must have world write permission. This can usually be done through the FTP protocol SITE command. The proper SITE command to execute is: "chmod 666 FILENAME" where FILENAME is the name of your HTML file. If you do not know how to use this command, please consult your FTP software documentation.

Every field included in the form (except one named 'fields') will be appended for each entry in the guestbook. Placement of the guestbook entries in the html file is controlled by the location of the following pair of HTML comments which must be placed on separate lines. Entries will be added in the space between the two HTML comments:

Another HTML comment (again on its own line) controls whether new entries are added to the top or bottom of the list, and how many previous entries are maintained. This comment looks like:
	<!--GUESTBOOK-OPTIONS: maxEntries=15,addBottom-->
In the example, the guestbook will retain the fifteen most recent entries and discard the rest. It will also add new entries to the bottom instead of the top (adding to the top is the default). If no 'maxEntries' option is specified, old entries are not discarded.

When outputting the fields submitted (the fields within the html form - see examples below), all HTML significant characters (<, >, &, etc) are converted to the appropriate HTML codes. The text is also scanned for things that look like email addresses and/or web addresses. All web addresses and email addresses are translated into clickable links in the resulting output.

To control the order the fields are output into the guestbook, the hidden field 'fields' may be used. This field should contain a comma-separated list of the field names in the order they are to be output in the guestbook area. If this field omitted, the output order is indeterminate.

The following links demonstrate four simple guestbooks with their HTML source code:

A simple guestbook

A guestbook that adds at the bottom

An online results visible survey

A guestbook with the form at the bottom

Infobahn Outfitters, Inc
210 North Coal, Colchester, IL 62326
(800) 839-3706 --- (309) 836-3706
© Copyright 1997-2013, Infobahn Outfitters, Inc.