I once did something similar, without AJAX. The basic steps were:
1. load your required data in the back-end in PHP
2. output to your page as javascript arrays
3. attach an onChange function to the first dropdown
4. populate the 2nd dropdown from the array data, based on the 1st
selection.
If you have heaps of data, you should probably use AJAX, and I suggest
you use JQuery libraries in that case. But if there is not too much
data, this approach works nice and fast.
I googled "javascript cascading dropdown example" and found this
example:
http://www.trans4mind.com/personal_development/JavaScript/tripleMenu.htm
Geoff.