Enhancing Websites with PHP

More Database Query Techniques

At this point you may have realized that you have no mechanism in your application that prevents a guest from signing your guestbook more than once. Also, though you now can delete guest records, you’ll eventually want the option to edit a guest’s record when they change their name or email address.

To prevent a guest from signing your guestbook multiple times, you’ll need to edit the addguest.php script to check to see if the first and last names and related email address already exists. Editing guest records is a bit more complicated than deleting records, however by using a sticky form you should find it fairly straightforward.

print