I've been looking around SO for a sec and been seeing questions about displaying categories and was wondering how would I display all my sub categories for my parent categories for example my link below?
I'm using PHP & MySQL -Thanks in advance!
Here is my link.
http://www.example.com/categories/index.php?main_category=web-development&sub_1=programming&sub_2=html&sub_3=basics&sub_4=forms&sub_5=select-tag
Here is my MySQL code.
CREATE TABLE categories (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
parent_id INT UNSIGNED NOT NULL DEFAULT 0,
category TEXT NOT NULL,
PRIMARY KEY (id),
INDEX parent (parent_id)
);
I know that i can then use mod rewrite to get urls to look like this.
http://www.example.com/categories/main-category/sub-1/sub-2/sub-3/sub-4/sub-5/