Home arrow PHP arrow Page 7 - Building A Quick-And-Dirty Guestbook With patGuestbook (part 1)

User, User, On The Wall... - PHP

Want to plug into what your site visitors actually think? All you need is a little time, a dollop of imagination and a copy of patGuestbook. More, inside.

TABLE OF CONTENTS:
  1. Building A Quick-And-Dirty Guestbook With patGuestbook (part 1)
  2. Introductions
  3. Home Sweet Home
  4. The Voice Of The People
  5. Playing The Field
  6. Code Poet
  7. User, User, On The Wall...
By: Harish Kamath, (c) Melonfire
Rating: starstarstarstarstar / 49
February 28, 2003

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
So that takes care of the geeky stuff that goes into the back-end of the system. Now, how about actually checking out what a user to your site would see when they launched the guestbook module?

In order to view the user experience for yourself, point your browser to the example script above, at http://localhost/patGuestbook/example.php, and you should see something like this:



You can now use the "Add New Entry" command to enter a comment in the guestbook.



As you can see, the fields displayed correspond exactly to what you specified when configuring the guestbook (just to see if it all works as it should, try leaving out a required field when submitting your comment - patGuestbook should barf and display a whole string of errors). When you're done, use the "Save Entry" button to save your comment, and the application will take you back to the main guestbook page, which should now display the comment you just entered.



You can now link to this script from other pages in your site, and start watching as the comments roll in!

That's about it for the first part of this article. Of course, this isn't all you can do with patGuestbook - in the second part of this article, I'll show you how you can customize the look and feel of the default guestbook, together with instructions on how to moderate and deactivate individual entries. Make sure you come back for that!

Note: All examples have been tested on Linux/i586 with Apache 1.3.28, PHP 4.2 and patGuestbook 1.0. Examples are illustrative only, and are not meant for a production environment. Melonfire provides no warranties or support for the source code described in this article. YMMV!

 
 
>>> More PHP Articles          >>> More By Harish Kamath, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: