I want to do something that seems very simple but it's a bit hard to explain, so I'll just give you an example.
Suppose you have a MySQL database with 2 tables -
Cars (id, name)
Models (id, name, car_id)
The models include a reference to the car they belong to. For example, if the table "Cars" has 2 rows - (1,Mercedes) and (2,Volkswagen), then an example for a model that belongs to Mercedes in the "Models" table would be (1,E-Class,1), the latter 1 being the id of Mercedes.
My problem is this: I want to have 2 select boxes, one representing the car and the other representing the model. But, the point is that when the user changes his car selection, the other select box changes automatically so as to include only models that belong to the selected car.
I hope you understood this annoying explanation :-)
Thanks for your help!