Make my own web site - BLOG DESIGN SOLUTIONS As with the edit post
BLOG DESIGN SOLUTIONS As with the edit post page in your CMS, the blog post page is called with a post_id in the query string so it knows which blog post to display. The blog homepage (index.php) you just created links to the post page like this: post.php?post_id=n where n is the post_id of a post. Clicking a link on your homepage should take you to a blog post that looks something like Figure 7-14 (if you haven t already, make sure you have added some blog posts using your CMS). Figure 7-14. The post page for your first blog post At this point, you could have a little play by adding a few new posts through your CMS and see how they appear on the homepage and on their individual post pages. Adding comments One of the great attractions of blogging is allowing your readers to comment on what you have written. I ll now show you how to add commenting to your blog engine. Each comment will be stored in the database, so first you need to create a table in which to store the comments. Open up PHPMyAdmin in your browser. Select the database blog in the left side and then click the Structure tab. In the Create new table on database blog area, type comments into the Name input box and 7 into the Number of fields input box, as shown in Figure 7-15, then click Go.