Home arrow MySQL arrow Creating the Blog Script for a PHP/MySQL Blogging System

Creating the Blog Script for a PHP/MySQL Blogging System

In this second part of a three-part series on blogging with PHP and MySQL, we will be looking at the actual blog. The blog will be simplicity itself. I have created a style sheet that will help in making the blog look clean and neat. The blog will be based purely on a open blog system.

  1. Creating the Blog Script for a PHP/MySQL Blogging System
  2. The Database Tables
  3. index.php
  4. comments.php
By: Jacques Noah
Rating: starstarstarstarstar / 95
October 10, 2006

print this article



A downloadable file for this article is available here.


Integrating the login script with the blog should not be a problem for you. In fact all it needs to do is send a user through, if his or her login is valid, and then log the user out. The blog will have a MySQL backend that will store all the articles and related replies.

It will also have a categories table that we will use to store all the different categories in. The categories will help us group the articles together that belong to the same category. This will be achieved by adding a "categoryID" foreign key to the article table.

To retrieve the articles we will mostly use joins in our SQL, as this is the best way to retrieve grouped information, which in our case is absolutely vital to the way the blog structures the articles. We will also retrieve the most recent topics and display them on the side bars for easy access. This will act as a shortcut for the user, when he or she wants a quick view of what the latest messages are about.

The index page sends two values over to the comments page. These values represent the categoryID and the article ID. They will be used to retrieve the article and its replies on the comments page; they will also be used to retrieve the category names, which are related to those articles.

>>> More MySQL Articles          >>> More By Jacques Noah

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Oracle Unveils MySQL 5.6
- MySQL Vulnerabilities Threaten Databases
- MySQL Cloud Options Expand with Google Cloud...
- MySQL 5.6 Prepped to Handle Demanding Web Use
- ScaleBase Service Virtualizes MySQL Databases
- Oracle Unveils MySQL Conversion Tools
- Akiban Opens Database Software for MySQL Use...
- Oracle Fixes MySQL Bug
- MySQL Databases Vulnerable to Password Hack
- MySQL: Overview of the ALTER TABLE Statement
- MySQL: How to Use the GRANT Statement
- MySQL: Creating, Listing, and Removing Datab...
- MySQL: Create, Show, and Describe Database T...
- MySQL Data and Table Types
- McAfee Releases Audit Plugin for MySQL Users

Developer Shed Affiliates


Dev Shed Tutorial Topics: