This guestbook stores all of its data in a flat text file, so no database is needed. This makes it easy to use for people who want their own guestbook and have webspace with PHP support, but no access to a MySQL database, which often costs more and is not needed for mosts smaller projects. That does not mean that you have to live with less comfort - this script offers some features known from other scripts, among them
The phpBook archive contains the following files:
Just copy all these files into the same directory on your web space. You might have to explicitly label the script as "executable". You will see this is necessary if you know for sure that PHP is enabled for you but you only get to see the code instead of a nice looking guestbook.
To do so, load your favorite FTP program (I use SmartFTP on Windows and gFTP and Linux, but every ftp program should be fine), and open the directory where you put these files. Now this is where it is probably different with each FTP program - with SmartFTP you right-click on the file guestbook.php and select "Properties / CHMOD" from the context menu. At the bottom of the new window, you can set so-called flags ("read", "write", "execute") for either "user", "group" and "other". You will probably have to check "executable" for "other". Experiment with it until it works.
The file "guestbook.php" is the PHP script itself, but you can of course open it with any text editor you have at hand and take a look at it.
Pretty much at the top, you can see a line reading
// global variables such as filenames and settingsand following that, some lines which configure some parts of the script. Some of these do not change anything visible (name of the guestbook database file), but others do change the behaviour (how many posts per page, sort order for posts). You should change $adminusername and $adminpassword to something else. You can change everything else in there, it should be pretty much self explanatory with the variable names and the comments directly behind them.
I do not have any checks in there to catch problems if you set e.g. the number of posts per page to below zero - this is not something someone from outside is going to hack, and I think you will be wise enough to fill in valid numbers. After all, you want this to work...
The file "guestbook.css" is a CSS (Cascading Style Sheet) file for the guestbook. If you know how to write HTML and used CSS yourself, go ahead and play with it. This is just regular CSS, no magic involved. Make the guestbook fit your own webpage with this. If you do not know what CSS is, either be daring and play around, or go learn something about it first. There are some pretty good online tutorials for CSS and HTML.
This guestbook is brought to you by Thomas Hettenhausen and released under the GPL. I wrote this little script because I intended to move my web presence from a HTML-only host to one allowing PHP, but not MySQL (a matter of money), and I did not find any suitable PHP-based guestbook. Right now I do have MySQL, but hey - that does not mean I cannot finish a project I start! On the other hand, free guestbook services might have been ok, too, but they usually display advertisements, are sometimes slow in response (after all, they are free, and their companies do not want to spent lots of money for their free services), and they often are not exactly easy to modify in their appearance, so they never quite fit your web page design.
And since I am a student of computer science, I might as well just write my own if I need it.
If you like this guestbook, drop me a line and tell me! I would love to hear from installations, and I can also put up links to some of the sites that use it.
Thomas Hettenhausen, July/August 2003
http://www.hettenhausen.net