PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
i have table maincategory name as maincat_id ,maincat_name
then i have sub category as subcat_id,subcatname,maincat_id
what i want is two dropdown
in first the rows from main category will be displayed and in second drop based on main categoy on first rows from subcategory(of that main category) will be displayed
and then main_catid and sub_catid passed to another page
is there any way of doing it
may be not using too much of javascript(or may be less javascript)
Note: i saw one similar tutorial in this site but its too complicated and its not using mysql database
Probably the most straightforward way would be to load all the data for both and use Javascript to build the sub-select. You could also have the main select submit the page and use PHP to create the sub-select.