I have a drop down list with parent categories and sub categories which would look like this
Parent Category 1
Sub category 1
Sub category 2
Sub Category 3
Parent category 2
Sub category 1
Sub category 2
Parent category 3
The drop down list is part of a form. The form’s action is index.php and method is GET.
When the form is sent the query string will need to read this for a parent category
index.php?page=15&cat=value of parent category
And this for a sub category
index.php?page=15&cat=value of parent category&subcat=value of sub category.
All of the values are numeric and are stored in a databse. The drop down list is created dynamically.
My problem comes with forming the query string. I have tried different methods but none of them work.
Has anybody got ideas of how I could solve this?
Thanks for any help.