Setting Up a Guestbook

A guestbook is a fun addition to your Web pages. With a guestbook, visitors to your pages may leave their names and some comments on a public page for anyone to view. Take a look at this guestbook example to give you some idea of how it works.

Following are instructions to implement the guestbook script on your pages:

  1. At the bottom of this page, you'll find some HTML code. Copy that code into a text file. Name the text file guestbook.html.
  2. Edit the HTML file to customize it. You will need to:
    • Change the title
    • Change the line that reads <H1>My Guestbook Page</H1>, if you want.
    • Change the line that begins: <FORM METHOD="POST". You will need to replace the words "THE PATH TO THIS FILE" with the path to your guestbook.html file. In this case, the path will be the same as the file's URL, except with the "" part not included. Here's an example. Let's say the URL to my guestbook.html is So I "cut off" the "" part, and replaced the words "THE PATH TO THIS FILE" with "~stevesh/guestbook.html ". The resulting line reads: ACTION="/cgi-bin/ guestbook.html"
    • Add any additional text you wish to add to the bottom of your page, such as an address listing or a mailto link.
    • To make the guestbook.html file world-writeable, log into your shell account and use the command: chmod 766 guestbook.html.
      PPP accounts need to e-mail to change permissions to make the guestbook work.
    • Load the guestbook page in your browser and try it out!

The guestbook.html code


<TITLE>Example Guestbook</TITLE>

<!-- You will need to customize this page for your own use. --> <!-- See the comments included in the code for hints on customizing. -->


<BODY BGCOLOR="#ffffff">

<H1>My Guestbook Page</H1> <P>Hi, and welcome to my guestbook. Please sign below:</P> <P>Last post on

<!-- Do NOT delete this line! --> <! - -LASTDATE- - > <! - -GUESTBOOK- - > <!-- Do NOT delete this line! --> <!-- Do NOT delete this line! --> <! - -POINTER- - > <HR>

Sign the guestbook:<BR>


<!-- Delete the words "THE PATH TO THIS FILE" and replace them with the actual path to this html file. -->

Name: <INPUT TYPE="text" NAME="name" SIZE="30" MAXLENGTH="30"><BR>

E-mail address: <INPUT TYPE="text" NAME="address" SIZE="30" MAXLENGTH="30"><BR>

Your URL (Optional): <INPUT TYPE="text" NAME="url" SIZE="30" MAXLENGTH="30"> <BR> Your sites name (Optional): <INPUT TYPE="text" NAME="urlname" SIZE="30" MAXLENGTH="30"> <BR> <BR> <P>Comments:<BR> <TEXTAREA NAME="body" ROWS=15 COLS=60></TEXTAREA></P> <BR> <INPUT TYPE="submit" NAME="" VALUE="POST"> <INPUT TYPE="reset" NAME="" VALUE="CLEAR"> </FORM>

<!-- Put additional text, like an address or something, here. -->


Things to Look Out For:

  • Be careful when editing the FORM ACTION line to include your path. If you don't get the path right, the guestbook will not function. The easiest thing is to remember that the path is the URL with "" removed.
  • After you've been running the guestbook for a while, you will have a lot of old guestbook entries built up on your page. The script will not automatically remove them, but you can easily remove them by manually editing the guestbook.html file.
  • When editing the guestbook.html file, be very careful not to remove the lines <!--GUESTBOOK-->, <!--LASTDATE-->, and <!--POINTER-->. If you remove those lines, the guestbook will not work!

If your guestbook does not work for you, check these things:

  1. Did you make the guestbook file world-writeable?
  2. Did you accidentally delete the lines <!--GUESTBOOK-->, <!--LASTDATE-->, and <!--POINTER-->?
  3. Did you enter the path correctly, without typos or miscapitalized words?

HOME >Homepage Setup >FAQ >Feedback

>OS >Windows 3.1 >Windows 95 >Windows 98 >Windows NT >Macintosh

>SUPPORT >FTP Support >E-mail Support >Modem Support