Guestbook Tutorial
I recently made a guestbook for a client my company was working with. Since the project was rather easy, and used some typically advanced Javascript and Ajax functionality, I chose to create a template for it and universalize it for everyone. The following tutorial will explain how to implement the guestbook:

1) The Guestbook I have written has the following specifications:

- Anyone can post a message any number of times
- 3 fundamental fields per message are displayed: Message Body, Name, and Time
- The form to add a message is toggled between visible and hidden
- The look and feel of how the guestbook is displayed is easy to customize

Here are the basic requirements:

- Server needs to be running PHP, and Database is MySQL

2) There are four files that need to be linked. Please download each of them.

guestbook.js - The javascript file which does all the work
XHConn.js - An open source library file which makes the AJAX calls easier
functions_guestbook.php - The script file which interacts with the database and returns valid information (rename to functions_guestbook.php)
guestbook.css - The style sheet which should be customized

3) The MySQL database should be set up like this:

4) In the file that is going to implement the guestbook, please add the following code in the <head> tag:

Then in the <body> tag, here is the code for the guestbook. (Please note you can customize it however you would like later on.)

And finally, you need to need the following to your <body> tag:

<body onLoad="prepare_entries();">

This is it! If you want to customize the look of the guestbook, the guestbook.css file is where it can be done. Other than that, if you have any questions for me, please email me at sfannan@gmail.com

Click here for an example