You would need to use javascript for this, and possibly AJAX.
1) You could load everything into a javascript array, and when they select one dropdown box, a javascript function would load the next dropdown box from the array of data you populated as the page loaded.
2) When they select one dropdown box, a request is sent back to the server for the next dropdown box options (using AJAX), which would then populate the second box.
Either way, you could not do this solely by using php, as it is only server-side, and you want the page to update without reloading.