2 Combo Box (PHP)


I have PHP+MySQL project. I have table for menu in MySQL database. There is field group and field subgroup. For item which has submenu field group is for example 3 and field subgroup is 0. All items for submenu has field group 3 and field subgroup is 1, 2, 3... Nothing special. I know how to make combobox using data from dataset to make combobox for groups, but I want to make 2 comboboxes where changing group in 1-st combobox will result changing data in 2-nd combobox where will be only items which are submenu for selected menu in 1-st combobox. It has to work without reload and I know it has to be done by JavaScript (generated by PHP). I think it could be solved by some arrays which I 'put' into combobox on event 'onChange', but can You help me with some example how to make this?

Thanks a lot



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!