Simple guestbook – PHP script

Views: 8055 Last modified: December 25th, 2011 Comments: 0

This simple guestbook, written in PHP using MySQL, is just an nice start of my little project.

Live Demo – Guestbook

Functional design

  • Install script: will add tables and default settings to your database
  • Visitors can leave messages
  • Error control entry name: must be alphabetical
  • Error control entry text: minimum amount of characters
  • Admin: login with username and password (MySQL)
  • Admin: logout
  • Admin: delete messages
  • Manage administrator account: change username and password
  • Manage settings
  • Flood protection: seconds can be set as you wish

How to configure and use ?
Simple, but first of all – create an database, just like you always do.

After you created an database you need to download the package and extract the files somewhere on your computer. After extracting the files you’ll notice an folder “guestbook”.

You need to provide some information to make this all work. So – open the folder “guestbook” -> folder “db” -> file “db.php”. It looks like this:

<?php
// Start Change
define('DB_HOST', 'localhost');
define('DB_DB_NAME', '');
define('DB_USER', '');
define('DB_PASSWORD', '');
// Stop Change
?>

All you need to do is provide the requested information(Database name, Database user and password) and save the file.
Example:

<?php
// Start Change
define('DB_HOST', 'localhost');
define('DB_DB_NAME', 'guestbook');
define('DB_USER', 'gb');
define('DB_PASSWORD', '&5nh%s');
// Stop Change
?>

Now, upload the resulting folder “guestbook” to some directory on your web-server(or localhost) and go to the “guestbook” directory using your webbrowser.

For instance: You uploaded the folder(guestbook) to your main domain. In this case you need to visit the following URI with your webbrowser

http://some-domain.com/guestbook/

If you provided the correct database credentials, the auto-installation will start and finish in 2 seconds.

If the installation(database tables and settings) was successful, it shows “Query complete” – what looks like this

Just click “Guestbook” or “Admin” from the top navigation and you’re ready to go. That’s it.
Default logon:

Username: admin
Password: admin

Live Demo – Guestbook

VN:F [1.9.13_1145]
Rating: 6.0/10 (3 votes cast)
VN:F [1.9.13_1145]
Rating: +1 (from 1 vote)
Simple guestbook - php script, 6.0 out of 10 based on 3 ratings
    Guestbook
    Guestbook
    guestbook.zip
    13.7 KiB
    24 Downloads
    Details...

    Mail this!

    To: From:Sum {2+6} =  
    Anything to add ?

        You must be logged in to post a comment.