How can I make something like that:
I will have 3 dropdown menus
First Dropdown menu will be: Class
Second Dropdown menu will be: Area

Third Dropdown menu will be: options that will change

3 Examples:

1. if I choose on "Class" Dropdown menu the option "A"
It will show on the the Third Drop down
"A1","A2","A3"
2. if I choose on "Class" Dropdown menu the option "B"
It will show on the the Third Dropdown
"Y1","Y2","Y3"
3. if I choose on "Class" Dropdown menu the option "A" and on "Area" dropdown menu the option "Center"
It will show on the the Third Dropdown
"X1","X2","X3"

And I need to get the categories from Database..

How can it be done?