mtvaran Posted November 14, 2010 Share Posted November 14, 2010 Hi guys, i have to create a drop-down menu for database data, when i select one data from that then next drop-down menu has to create automatically with related data of the 1st selection. could anyone please give me some help to do this? NB: i have 3 tables student(sid, sname), course (cid, cname) , take (sid, cid) so if i select one of the cid then another drop down list has to create automatically with sid who is taking the cid . Quote Link to comment https://forums.phpfreaks.com/topic/218617-how-to-create-two-dropdown-menu-linking-each-other/ Share on other sites More sharing options...
kai555 Posted November 16, 2010 Share Posted November 16, 2010 Hi The best way to this would be to use Ajax to populate the second drop down as soon as the user selected from the first one Quote Link to comment https://forums.phpfreaks.com/topic/218617-how-to-create-two-dropdown-menu-linking-each-other/#findComment-1134920 Share on other sites More sharing options...
thehippy Posted November 16, 2010 Share Posted November 16, 2010 Yeah this is usually done with some kind of AJAX interface now a days. We used to just do a call back to the form after a 'onChange' to reload the whole page with the form and new sub-select values. Quote Link to comment https://forums.phpfreaks.com/topic/218617-how-to-create-two-dropdown-menu-linking-each-other/#findComment-1135098 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.