I’ve got a form for adding a product to and I want to select the categories via a drop down box.
My Categories DB makeup is as follows:
CREATE TABLE `categories
`Category_ID
`Category_Name
`Category_Image
`Category_Date
`Category_Parent
`Category_Order
PRIMARY KEY (`Category_ID
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
When the category is a sub category the parents category ID is used in the parent box.
What I want to do is create my drop down HTML box so that the category names are ordered nicely and nested under each other.
Any ideas on the PHP code to do this?