• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Databases > Adding Comments to the PHP Blog

Adding Comments to the PHP Blog

Building on the comment table we created earlier in the chapter, we will now learn how to add the comments to our page. A blog is pretty boring if you can’t make comments to the author. I get about as much pleasure reading comments as I do the blogs themselves!

In this section I’ll show you how to take the code we created in the previous section one step further and add the comments. I’ll keep them in a hidden <div> and show and hide them through an anchor tag (<a>). You’ll see the link “Show/Hide 1 Comment(s)” under each blog entry in Figure 10.5. In the next section, I will show you how to add entries through a Web input form.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint