I would say to use a combination of JavaScript, PHP and a DB.
Use a JS OnChange event in the first SELECT box to call a window.location method to reload the page.
Pass a search string from the first SELECT box to the window.location method which PHP will use to populate the options for the second SELECT box.
This will make your page reload with each click. I am sure you could alternatively load all the SELECT options for each box into an array and not have to load the page each time, just have it write the new SELECT box when you need it.