Ultimate Guestbook Tutorial: How to build a Guestbook with a honeypot, error checking, IP banning, pagination, e-mail notification and smilies with PHP and mySQL

Ultimate Guestbook Tutorial: How to build a Guestbook with a honeypot, error checking, IP banning, pagination, e-mail notification and smilies with PHP and mySQL

In this tutorial i will teach you how to make a guestbook script with PHP and mySQL. Guestbooks are very common today on the internet and are great for getting user feedback or a simple hello from your site fan’s. This tutorial will feature form submission techniques, user input error handling, smilies, honeypot traps, and pagination. The final version of this script can be downloaded below, but i recommend that you follow the tutorial in its entirety so that you can program something similar yourself, or modify the script to suit your needs.

But first of all check out my site if you’re interested in custom decals! Designed by you made by us! www.wedecal.com!

Source: guestbook.zip
Demo: http://www.jotlab.com/tutorials/guestbook/

Posted by VoiDeT

Categorised under PHP
Bookmark the permalink or leave a trackback.

60 Comments

  1. CGar

    Hello VOIDET

    I spent last night going through this tutorial and it was great and informative.

    One question I have is that I see your guestbook example has had some spambot action. Is this because there are new techniques that your tutorial doesn’t cover? I’d like to keep this kind of crap off my guest book if possible.

    Thanks for your great tutorial and your feedback.

    Best,
    CGar

    August 3, 2009 @ 3:43 am
  2. VoiDeT

    Hey Cgar,

    This is both true and unfortunate.
    I only taught one spam catching technique.
    However more can be applied if need be. Generating a captcha form, or having an ip-ban with 30 day cool off period. Running known ip blocking from black lists.
    The honey pot technique is just one! Surprisingly, it rejects quite alot!

    Let me know if i can help you out further!
    VoiDeT

    August 3, 2009 @ 4:48 pm
  3. Dennis van Duinen

    Hi there,

    A great tut! Im trying to put it on my site.

    But there is one little problem. The honeypot.. when is add this link:

    a new text field appears on my guestbook, while you where saying that it was hidden?

    How is that possible?

    Dennis

    November 12, 2009 @ 10:40 pm
  4. Hi there. Thanks for the great tut. Sorry…forgot to read the last side, as I didn’t used all of the tut for my guestbook at the moment. So I implemented the guestbook in my website without asking you first. And…I’m not completly ready, still working on some things as the honeypot and the pagination.

    December 6, 2009 @ 8:39 am
  5. Hello VOIDET,

    This is the best tutorial on the internet so far! :D

    I’m stuck at stage 7 – 10,
    it looked fine until stage 7 then the succes-message never showed up. :(

    The IP thing didin’t work for me :/ so I jumped that part and now I’m trying to get the entries to work out, but it show me this message:
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\guestbook\templates\entries.php on line 6

    do you have a idea of what’s wrong?
    I would be happy for any help, just contact my email!

    Regards Zime

    December 20, 2009 @ 11:02 pm
  6. VoiDeT

    @Zime:
    Thanks a lot for the kind words.
    That’s a shame that you can’t get the guestbook working. It looks as though your data isn’t being insert correctly. What you can do however is check your database for any records. If they aren’t in there then check what’s going on with data you’re inserting, and the insert commands.
    If you do see the data in there, then check what’s happening when you try and retrieve the records.

    I’m thinking i might rewrite this tutorial to use OOP with PHP5.
    Or maybe save that for a whole new tutorial.

    December 21, 2009 @ 1:45 pm
  7. Hi
    First great thanks to the author of this tutorial/workshop

    Its working great. But there is only a single problem with the website links in the db entrys they re not working.

    The link includes the hole file path i.e.(http://htdocs/mywebsite/www.pcsh.it) whats wrong?

    thx in advance and best regards
    Oli

    January 29, 2010 @ 4:37 am
  8. Robin

    THX a lot

    love this tut

    March 31, 2010 @ 11:22 pm
  9. ome tony

    hey, where can i find the turtorial?

    greetings

    June 1, 2010 @ 10:55 pm
  10. Dude, many thanks for this nice and clean tutorial. Took me about an hour to read it all up and add own commands.

    July 12, 2010 @ 12:13 am

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

or