I'm wondering if it's possible to create something in PHP that behaves like the below JavaScript example...
I have two dropdowns, one for size, one for color. Depending upon what size or color is selected, the other dropdown is filtered so that the colors or sizes listed always correspond.
For example, the following T-Shirt is available in the following colors & sizes:
Baby Tee - Red - S, M
Baby Tee - Blue - S, M, L, XL
Baby Tee - Green - XS, L, XL
Baby Tee - Yellow XS, S, M, L, XL
Baby Tee - Orange, S, M, XL
So, if you select "Red" from the color dropdown, the only sizes that the user sees is S, M. If the user selects "L" from the size dropdown, the only colors the user sees is Blue, Green, Yellow. It works fine in JS, but I want to create the same effect using PHP exclusively.
Is it possible to do this? How would I go about something like that?