[offtopic]I have to say, I love southern accents 🙂[/offtopic]
Okay, nice video.
Now, your table structure should probably be more like two tables: One for the categories, and one for the design. So your current DB structure (with everything in one table) will work, except that when you misspell something, or want to change "php_builder" to "PHPBuilder", you have to edit every row, instead of just one row 😉
But anyway... that's a different issue. Let's get your stuff running.
Okay, so first test:
Using the coding above (i.e. the original query), do me a favor and go to this URL:
/category.php?id=Space
I'm just going to say: it will work.
Why does it work?
It works because you stated that the WHERE clause of your SQL has to be manually set to "Space"; however, in your URL you use the integer "id" of the rows instead of the string "categoryid". So if you changed your first file's php code from:
echo "<a href='/category.php?id={$row['id']}'>";
to
echo "<a href='/category.php?id={$row['categoryid']}'>";
Your code should then work.
To split your tables into two, you'd have one table category and the other called design. For example, category would be the following:
id | title
----+------------
1 | Space
2 | PHPBuilder
3 | Test
The table design would be something like:
id | categoryid | title | bgcolor | bgimage | bgrepeat | backcolor |
---+--------------+-------------+-----------+------------------------+------------+-------------+
1 | 1 | Starfield | 000000 | bgimagestarfield.jpg | YES | FFFFFF |
2 | 1 | Video | 000000 | bgimagestarfield.jpg | YES | FFFFFF |
Now, your first script would query the category table for all categories, and use your original code (so $row['id'] instead of $row['categoryid'] like I suggested earlier).
The second script would not need to be changed, except to query the design table.
Hope that helps you along, and gets your problem solved in one way or another.