How to implement & manage the Guestbook on your website.
Getting feedback from your fans can be challenging. Crowded clubs don't necessarily provide the best venue for hearing what your audience has to say.
Having a Guestbook on your site is like giving your fans a direct line to interact with both you and each other. It not only encourages them to leave you invaluable feedback, but allows them to see what other fans think by reading previous entries. Fans can come to your site the day after a show and tell you how great it was, or random surfers can see what a blast everyone else is having by reading previous entries and be encouraged to come to the next show.
How to Do This Tutorial
Do a [CTRL]-N (or Command-N on Mac) to open a new web browser window. Point that window to http://yourdomain.com/hostbaby (replacing yourdomain.com with your actual domain) - leaving THIS window where it is. Flip back and forth between the two. Read things in this browser-window. Try them in another browser-window.
Log in to /HostBaby
To log in to your special Hostbaby features, you always have to LOG IN to yourdomain.com/hostbaby
The username and password are the ones we gave you when you first signed up - unless you've changed them or added a new user yourself.
If you forget your password you can click the "email it to you" link - and it will email the email address we have on file for you.
Once you're logged in, you should see the YOUR STUFF box as shown here.
Click the guestbook link.
Making entries in your guestbook
Before we can show you how to manage your Guestbook, we'll need to give you something to manage. Switch over to that new active window and load http://www.yoursite.com/guestbook.html. You should see something like the screen shot here.
This is the basic template for your Guestbook and it already works without you having to do a thing. Go ahead and try it. Just put in your name, email address and a test/joke message and press the Submit Your Comment button. The results should give you something like this screen shot.
As soon as you hit the Submit Your Comment button the data is immediately entered into your database and then automatically appears beneath the Guestbook entry fields. This is the same experience your website users will have when they post.
So what happens if someone leaves a message you don't want others to see? Let's move on to the next step; managing your Guestbook. First thing you need to do is log in.
Managing your guestbook
When you log into your guestbook tool you should see something similar to the screenshot here.
As each new entry is added to your guestbook, it is automatically displayed here in your administrative account. You can sort entries by ID, Name, Email, Comment or Date. This will make it easier for you down the road when you have a long list of entries.
You'll note the delete link at the end of each entry. Clicking this will delete the adjacent entry. You will get a confirmation window in case you change your mind, so have no fear.
Go ahead and toggle between this screen and your http://www.yourdomain.com/guestbook.html to practice adding and deleting entries. Once you feel confident, we can move on to the next step.
Implementing the guestbook - editing guestbook.html
As you have already seen, when we created your account at Hostbaby, we made a file called "guestbook.html" that has everything you need to display your Guestbook and its entries.
There are several ways to implement the Guestbook function on your website. The first ways is to simply edit the existing "guestbook.html" that is already on your server.
If you'd like to use the guestbook.html that we created for you on your web server, simply FTP download it from the webserver down to your hard drive, so you can make changes to it.
If you don't know how to download a file from your webserver to your hard drive, contact firstname.lastname@example.org for special help or see our FTP tutorial. FTP uploading and downloading are the VERY basics of making your website, so you should learn that before making a concert calendar or anything else.
Once you have the guestbook.html file open in your HTML editor, move onto the next step which shows how to cut & paste the Guestbook code into your own HTML files.
Implementing the guestbook - cut & paste
If you already have your own look and feel laid out and you just want to put the Guestbook into your existing pages and go, you can simply cut and paste the guestbook entry form and the 2 lines of php code that dictate the placement of the entries by doing as follows:
Put this line at the top of your HTML page:
<?php require "hostbaby"; ?>
Then put this where you want the guestbook entry form to appear:
<form action="<?php print $_SERVER['PHP_SELF'] ?>" method="post"> <table cellspacing="0" cellpadding="5" bgcolor="#CCCCCC" align="center"> <tr> <td>Name:</td> <td><input type="text" name="gbname" size="32" maxlength="64"></td> </tr> <tr> <td>Email Address:</td> <td><input type="text" name="gbaddress" size="32" maxlength="64"></td> </tr> <tr> <td valign="top">Comment:</td> <td><textarea wrap name="gbcomment" cols="29" rows="5"></textarea></td> </tr> <tr> <td valign="top" align="center" colspan="2"> <input type="submit" value="Submit Your Comment"> </td> </tr> </table> </form>
Then put this where you want the people's guestbook entries to appear:
<?php show_guestbook(); ?>
Then FTP upload your pages to your web server and you should be good to go!