Privacy Statement
Terms & Conditions
Contact Us


Webmaster Resources
Webmaster Forum
Guestbook Script
PHP Trivia

© 1998-2010. Unmelted, LLC. All Rights Reserved.

Guestbook Script Manual

This section describes how to use the guestbook script and how to customize it to meet your demands. The Perl guestbook script uses what we call template files in order to make it customizable to any type of webpage you may have. If you do not plan to change the look of the guestbook, you can skip the 'TEMPLATE FILES' section below. The following sections will describe everything that is required to make the best use of the script.

We use what are known as template files which basically allow you to match the guestbook design to your current website design. Template files make it easy to integrate this script into and allows you a great deal of options that many other scripts could never handle. We offer different templates that you can use with your script for free, which you can access in our download section. However, we encourage you to try and make your own.

This script has five template files: entrytemplate.tem, failure.tem, signup.tem, success.tem, and template.tem. The script called addguest.cgi uses signup.tem, failure.tem, and success.tem where signup.tem is the html file that will be used when people goto your page to enter comments into your guestobook, failure.tem is the page that will appear if they leave fields blank, or enter text in the fields incorrectly, and finally success.tem is the template that will be used when their comments have been successfully entered into the guestbook. Each of these files have special tags which can be used and we will talk about those in a second. The other script viewguest.cgi uses the other two template files: entrytemplate.tem, and template.tem. These files can also use the same special tags which will instruct the script where to enter data.

The special tags are displayed below, and if you open up any of the template files that will give you a better understanding on how to use them. Where ever you place these special codes the script will insert the data accordingly

Supported for: entrytemplate.tem, failure.tem, signup.tem, and success.tem
##NAME## Inserts the guest's name
##EMAIL## Inserts the guest's email address
##HOMEPAGE## Inserts the guest's homepage
##CITY## Inserts the guest's city
##STATE## Inserts the guest's state
##COUNTRY## Inserts the guest's country
##REFERED## Inserts how the guest found your site
##RATING## Inserts the rating the guest gave your site
##COMMENTS## Inserts the guest's comments
##ITEM1## Inserts the guest's info for item1 if existing
##ITEM2## Inserts the guest's info for item2 if existing
##ITEM3## Inserts the guest's info for item3 if existing
##ITEM4## Inserts the guest's info for item4 if existing
##ITEM5## Inserts the guest's info for item5 if existing
##ITEM6## Inserts the guest's info for item6 if existing
##ITEM7## Inserts the guest's info for item7 if existing
##ITEM8## Inserts the guest's info for item8 if existing
##ITEM9## Inserts the guest's info for item9 if existing
##WEEKDAY## Inserts the weekday of that entry
##MONTH## Inserts the month of that entry
##DAYOFMONTH## Inserts the day of month of that entry
##YEAR## Inserts the year of that entry
##TIME## Inserts the time of that entry
##ENTRYNUMBER## Inserts the entry number of that guest

Supported for: template.tem
##INSERTION## Where to insert each entry in the guestbook

Supported for: failure.tem
##FAILMESSAGE## The error message to be displayed

Supported for: signup.tem, failure.tem
##SESSIONID## Used with the security code image feature. You must place a text field of type hidden with the name 'sessionID' and the value of '##SESSIONID##' - Without including the session id the security image feature will not work. ##SESSIONID## will automatically be replaced with a session id.
##IF VERIFICATION## Used with endif verification below. Contents between these two tags will only show up if security image feature is on.
##ENDIF VERIFICATION## Used with if verification above. Contents between these two tags will only show up if security image feature is on.

To login to your admin area you should goto


It will prompt you for a password. The default install password is admin. We strongly recommend you change this password before you take the script live. We will explain how to change your password further down this page. Once you have typed in your password it should bring you to the main page of the admin area. If you entered a wrong password it will notify you and prompt you again for a password.

Once logged in you will see a page that has a table with blank entries. Eventually those entries will fill up but at the start they should be blank. On the bottom of the page you should notice a faint arrow on both the left and right side of the pages. When your page fills up with data those buttons will become active and will allow you to display different entries within the script which are located throughout numerous pages.

In the middle, towards the bottom of the page you should see a spot which shows the total amount of entries that are currently in the guestbook.

Below the total entries number you will see a scroll menu which has many different choices to take you to different areas within the script. Once you select something on that list you will hit the EXECUTE SELECTION button below to perform that task.

The following sections will go into detail on using different menu operations.

This is a fairly simple, but useful function. It will allow you to refresh the current entries that are displayed on the page. A time when you might want to use this is if you have had the admin page sitting for a long time and there could be possibly new entries. By using this function it would refresh the page and display the newest stuff.

This option allows you to edit any entry in the guestbook. First you must select a site that you wish to work with. Once you hit execute it will take you to a page which will allow you to edit any of the fields that was entered by the guest to be displayed however you wish. Once you have made the appropriate changes you will hit the save button at the bottom of that page.

This option will delete the selected entry in the guestbook. Useful function if inappropriate messages are left in your guestbook.

This link will allow you to change your passord that you use to enter the admin area. I strongly recommend you do this as soon as possible because the default password is admin, and anybody could get in easily because it is known.

This is a larger area as there are many different options which you can customize. We will break the areas up below.

This area defines the name of some system files. There is no reason to change anything in this area but again it is there for advanced users to keep the script very customizable. The only box is this area is title GUESTBOOK DATA FILE, and it is the actual file which stores each message that is left into your guestbook. It is the database, so if you deleted this file for no apparent reason you would lose every single entry in your guestbook. This may be a file you might want to backup from time to time, just in case you have a crisis with your server. Better to be safe then sorry.

There are three boxes in this area starting with SIGNUP TEMPLATE. This is the name of the template file you will use for when people want to enter a comment into your guestbook. The next box is SUCCESS TEMPLATE and it is the template that is used when a guest has successfully entered a message into your guestbook. This is the page that will be displayed. The last box is FAILURE TEMPLATE and this is the page that will appear when a guest fails to enter information correctly.

There are two boxes in this area starting with MAIN TEMPLATE. This is the name of the template file you will use for the general layout of the guestbook pages. This is the area where visitors can view entries left by others. This template only supports one tag ##INSERTION## which is where the next template is inserted. The next template is ENTRY TEMPLATE and this is the structure for each entry. You should only put the layout for what an entry should look like as this code will be repeated for each entry that is left in the guestbook.

There is only one option in this area which is MAX NUMBER OF ENTRIES TO LIST ON STARTUP. This is an option which specifies how many entries you want displayed at a time in the admin area.

The first option in this area is SECURITY CODE. This option allows you to either enable or disable the security code image feature which is used to help combat automated guestbook spam. By default this feature is on. If you are having troubles using the security code feature turn this option to Off. The next two fields are SECURITY CODE IMAGE WIDTH and SECURITY CODE IMAGE HEIGHT. These two fields let you specify the width and height of the security code image if it is enabled. You will also need to edit the width and height in the template for the guestbook if you change this option, otherwise the image might be distorted. MAX ENTRIES PER GUESTBOOK PAGE is an option which specifies how many entries you want displayed at a time in the actual guestbook. The larger this number is set, the less pages in the guestbook that will exist. So if you have the type of site that gets paid on impressions for ads, you may want to keep this number failure low so that many pages will exist. The second spot in this area is TIME ZONE. This option allows you to set your timezone in relation to UTC time, which is the time in Greenwich, England, and is the time that everybody bases their timezone from. The default is set to Pacific Standard time which is -8 UTC.

Some of the areas above are hard to grasp at first but once you start playing around with all the many different options you will soon find out how easy it is really to operate. Some scripts out there created by other companies may be really easy to explain to run, but they are also very uncustomizable leaving you barely with any options. This one gives you a great deal of freedom letting you keep the design of your site however you want it to be.

If you have a registered copy of the guestbook script and you are having any problems grasping a concept or understanding how a particular function works we will be happy to help free of charge.