BLOG DESIGN (Post office web site) SOLUTIONS Creating a screen for listing

BLOG DESIGN SOLUTIONS Creating a screen for listing posts At this point, you can add and edit blog posts, but when it comes to editing a post you still have to know its post_id and type the number into your browser. Not exactly convenient, I m sure you ll agree. Far more useful would be a list showing all your blog posts so you can select which post to edit. And that s what I ll show you now. All that is required is one SELECT statement and a PHP loop. Here s the entire code; save it in your cms directory as index.php (because you ll want it to be the default page in your CMS):

All blog posts

“.$message.”

“;} if($myposts) { echo “

    \n”; do { $post_id = $myposts[”post_id”]; $title = $myposts[”title”]; $dateattime = $myposts[”dateattime”]; echo “
  1. “; echo “$title . posted $dateattime”; echo “
  2. \n”; } while ($myposts = mysql_fetch_array($result)); echo “

“;

WordPress database error: [Table 'armadillowebhosting_com_-_apache.wp_comments' doesn't exist]
SELECT * FROM wp_comments WHERE comment_post_ID = '363' AND comment_approved = '1' ORDER BY comment_date

Leave a Reply