2 Combo Box (PHP) - Programmers Heaven

Howdy, Stranger!

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


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.