I use PHPMyAdmin so I don't know the SQL code - but you add the "category" the same way you add any other field to your database.
Then on your post form you can create a drop down list to choose the category to file your post under. The HTML code is fairly simple:
CODE
<p>
<select name="category">
<option value="topic00">Topic00</option>
<option value="topic01">Topic01</option>
<option value="topic02">Topic02</option>
</select>
</p>
You don't
have to use a drop down box, you can use a text box if you would like, but the drop down box helps you keep consistent with how you categorize everything.
Then make sure you add "category" in your PHP code in the section that looks like this (forgive me I'm not sure what the function is called):
CODE
if (isset($_POST['submit'])) {
$author = $_POST['author'];
$title = $_POST['title'];
$entry = $_POST['entry'];
$category = $_POST['category'];
and this:
CODE
$sql = "INSERT INTO php_blog (author,title,entry,category) VALUES ('$author','$title','$entry','$category' )";
If you want to display the category on your blog, add it into the array on the "blog.php" file:
CODE
while($row = mysql_fetch_array($result)) {
$title = $row['title'];
$entry = $row['entry'];
$author = $row['author'];
$category = $row['category'];
And echo it on the page:
CODE
<h2><?php echo $title; ?></h2>
<div><?php echo $entry; ?></div>
<div><p>Posted by <?php echo $author; ?>. Filed under <?php echo $category; ?></p></div>
You can also display by category as in an archive page but that is the basics. If you search other posts here you can find a lot of information. I learned how to do it from these forums so if you look back at old posts you'll get a lot of good tips. Good luck!