![]() |
|
|||||||||||||||||||||||||||
|
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 bushnell.net. 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: /cgi-bin/guestBook.pl 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: <!--GUESTBOOK--> <!--GUESTBOOK-->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 guestbookA guestbook that adds at the bottomAn online results visible surveyA guestbook with the form at the bottom |
|||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||
| © Copyright 2002-2006, Infobahn Outfitters, Inc. |