One very good
method for adding a guest book to your web site is to use one the written
by a well-recognized Perl script author, Matt Wright who makes it available
for download via the web.
Locate and download
the following files from Matt's
Create a subdirectory
named "guestbook" within your web site and upload both guestbook.html and
guestlog.html to the new directory.
The Perl script which adds to the guestbook.html.
The form that users fill out to add their entry.
- The guestbook file that contained the users' entries.
The short log of all guestbook entries. (optional)
Change the first
line of the Perl script to reflect the official path to Perl on our server:
There are a few
more things that need to be changed in the Perl script:
# Set Variables
- The URL address of your guestbook.html file
- The system location of your guestbook.html file
The system location of your guestlog.html file
$cgiurl - The
URL portion of the address to the guestbook.cgi file
The second and
third variables call for a system path which is not the same as a URL.
If your domain name is 'yourdomain.com' the system path would be /u/web/yourdo
where "yourdo" is the account userid.
As such, the
Set Variables section of the Guestbook script would follow this format:
# Set Variables
$cgiurl = "http://www.yourdomain.com/guestbook.cgi"
Be sure to substitute
your domain name and userid in the example above. The path to "date" is
Upload the "guestbook.cgi"
script to your public-html directory in ASCII transfer mode. You will need
to place the appropriate permissions on the files that need to execute.
Do a chmod 750 to the perl script.
Modify the form
ACTION attribute within "addguest.html" to reference the guestbook script
as shown below and upload to the "guestbook" directory.
Locate the file
name guestbook.html within the guestbook directory. Click the box marked
"PW" to the left of the guestbook.html file name to enable public write
access. This will allow the Perl script to append data to the file guestbook.html.
You can test the
script by referencing either the addguest.html or guestbook.html file via
A Few Options:
Do NOT remove the
tag with guestbook.html. This tells the Perl script where to insert new
Some possible causes
of a SERVER ERROR:
- Set Variables
section within Perl script inaccurate
- Perl script was
not uploaded in ASCII transfer mode
permission not set for guestbook.html (see #7 above)
The reference to
both the date and sendmail program are correct.
You can modify
the addguest.html and guestbook.html files to meet your own design standards.
to table of contents
Set the $separator
variable to display either a horizontal line or insert a paragraph tag
between guest book entries.
Set the $allow-html
variable to allow visitors to use HTML tags within their entries.