So now I don't need to write any HTML code to add a blog to my blog system. I have a GUI interface I can access through a browser to add my blogs with phpMyAdmin. So my blog is come a long ways in ease of use.
But what if I want to blog about something other than building a blog. Right now I only have one blog category and that is "Building a Blog". What if I wanted to blog about Quantum Computing. I would want to make a new category called "Quantum Computing".
So how do I add new categories to my blog? mySQL provides an interesting field I can use to create these categories. All I need to do is add the field to my blog table and select the category I want to use for that blog.
I'll click on the structure tab to add a field. Now I'll add a
ENUM field to my structured data. The
ENUM field allows me to add a list of strings that I can later select the blog category with.
Length/Values section there is a button called
Edit ENUM/SET values. When I click that it opens a window to add options that I can name. So I'll add the only category I have which is this project, Building a Blog. And I will also add "Quantum Computing". Just in case I want to dabble in that.
Now I can select "Building a Blog" when I add a new blog and all my existing blogs will default to it. But the category only appears on the home page in the blog previews. And those categories are static HTML. So I'll edit the code to use the category field instead.
Now when I select another category it will show in the blog preview box. So if I want to blog about a different subject I can just add it to the ENUM value. However I might need to dedicate a whole table for this later when I need to create category menus.
This is a test of the HTML form.