A McGraw Hill Book Plug-in PHP: 100 Power Solutions
By Robin Nixon (McGraw Hill 2010, ISBN 978-0071666596)

Home | About | Buy It | Download | Contact

Select Chapter: 1  2  3  4  5  6  7  8  9 10 11 12

Chapter 8: Plug-in 53 - Get Guest Book

Once you have a guestbook and the facility to post messages to it you'll also want to be able to display the messages and this function goes most of the way towards that by fetching all the messages from the datafile and returning them in an array. It does this rather than display them directly to leave you in complete control over how you want the output to appear.

The Figure shows posts from a Guestbook simply being displayed as regular text with no special formatting.