So I need to create two dropdown lists where second list is dependent on the first one. For example:
In first list I may have options like this:
- A
- B
- C
- D
When users selects A, then he will get to chose additional options in second dropdown based on the first dropdown. So In case user chose A in first list, options in second list may be:
- A-1
- A-2
- A-3
How can I do this in php and html ? Do I have to use multidimensional arrays ? Maybe database ? How would I detect what user has selected in first list and offer him proper options in second ?