Hi every1. I really need help with this one.
I have a web shop that i want to make a directory tree for the categories that are in the database. The table structure looks like this: ID, Name, Parent. Where parent is the parent category where this category belongs to.
What i want to do is to show all subcategories when a category is selected from the list. The categories may be nested into several subdirectories, and i want the user to see the complete structure as he browses. ie:
-Clothes
+Sweaters
+Suits
-Jeans
+Armani
+Diesel
+Levis
+Hats
+Belts
+Shoes
I only want to pass one variable so that the user may see the structure even if he did not go trough the directory list, but trough a search.
I am really pulling my hair (the little thats left :-), so any help here would be really appreciated.
Thanks alot.
Tom