I'm doing a program in php where I have set up table rms having fields rid, type and room. Type denotes whether its standard, cheap, expensive etc and room denotes the total number of rooms available.
I want to have a ddl to display the type and cascading ddl that display rooms like 1,2,3, etc up to total number available.
For example if I chose cheap from first ddl and its total rooms is 30 in the table, then the next ddl should show 1 to 30 in the list.
I was thinking about retrieving id from the first ddl to fetch the room corresponding to it but seems to have problems. Can it be done?