Guestbook

To add a guestbook to your domain, you need to make a page called 'messages.html' and FTP it to your main 'docs' folder. You need to set the file as 'writable by anyone' - consult your FTP programs help file. The messges.html can be designed however you please, but you need to add a 'form' for adding new messages. IF you don't know what an HTML form is, you are clueless! Here are some example implementation:
  • www.cyclecide.com's guestbook
  • www.freshartnyc.org's guestbook
  • www.thefirsttwins.com's guestbook
  • And lastly, www.monkeybrains.net's guestbook


  • Okay, here is what you need to do:
    Add a special comment in the 'message.html' file and the form for users to add more messages. Here is the comment you need:
    <!--begin-->
    A new messge will be added to your page where ever that comment is placed. And here is the sample form you need to add to allow users to add their messages:
    <form method=POST action="/cgi-bin/guestbook.cgi"> <input type=hidden name=color1 value=339900> <table border=0 cellpadding=4 width="521"> <tr> <td valign=top> <font color="663300" size="3" face="Times">Your Name:</font> </td> <td valign=top><input type=text name=realname size=50></td> </tr> <tr> <td valign=top><font color="663300" face="Times"><font size="3"> E-Mail:<br></font> <font size="2">(Optional)</font> </td> <td valign=top> <input type=text name=username size=50> </td> </tr> <tr> <td valign=top> <font color="663300" size="3" face="Times"> Message: </font> </td> <td valign=top><font size=-1 > <textarea name=comments virtual cols=50 rows=6></textarea> </font> <p><font size=-1></font> <input type=submit value="Add Message" name="submit"> </td> </tr> </table> </form> <script> var dc = unescape(document.cookie); dc = dc.substring( dc.indexOf('GuestBook=')+10 ); if (dc.indexOf('_')>0) { document.forms[0].realname.value = dc.substring(0, dc.indexOf('_')); document.forms[0].username.value = dc.substring(dc.indexOf('_')+1).toLowerCase(); } </script>
    You may have a separate 'add_message.html' page with this form, or you may tack the form onto the end of the actual 'message.html' page. I prefer the later of the two methods. For a full sample file, Check this out!

    To add a guestbook to your /~username/ site -- if you don't own a domain name -- your URL will be http://www.monkeybrains.net/~username/messages.html and you need to include a hidden field inside the form:

    <input type=hidden name=path value='/~username'>

    You Can also use this trick to put your messages file in another directory. This allows you to have one message board per directory! For example, to start another message board in your /food folder, you would add this line to the form:

    <input type=hidden name=path value='/food'>

    CHECKLIST / RECAP

    1. FTP messages.html to your /www.DOMAIN.com/docs/ folder
    2. Make sure the file you just uploaded is world writable on the server
    3. Test it out!

    Return to Support section of MonkeyBrains.net