Specifications
FIGURE 29.7
We can now see the message body for this posting.
This script shows us the message body, as well as the replies to this message. You will see that
the replies are again displayed as a tree, but completely expanded this time, and without any
plus or minus buttons. This is the effect of the $sublist switch coming into action.
Let’s look at the code for view_post.php, shown in Listing 29.6.
LISTING 29.6 view_post.php—Displays a Single Message Body
<?
// include function libraries
include (‘include_fns.php’);
// get post details
$post = get_post($postid);
do_html_header($post[“title”]);
// display post
display_post($post);
// if post has any replies, show the tree view of them
if($post[‘children’])
{
Building Practical PHP and MySQL Projects
P
ART V
732
35 7842 CH29 3/6/01 3:34 PM Page 732