I'm afraid I don't know where to begin with this one, I can create the listboxes so they populate dynamically by data from a database - but thats it!
It's the same concept here. Except now you take the process and expand it to say that if list 1 isn't submitted, then you can't see list 2. A simple example:
<?php
// A simple Dynamic Dropdown Menu
?>
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<select name="list1" onchange="this.form.submit();">
<option value="item1"<?php echo ((isset($_POST['list1']) && $_POST['list1'] == 'item1') ? 'selected="selected"': ''); ?>>Item 1</option>
<option value="item2"<?php echo ((isset($_POST['list1']) && $_POST['list1'] == 'item2') ? 'selected="selected"': ''); ?>>Item 2</option>
<option value="item3"<?php echo ((isset($_POST['list1']) && $_POST['list1'] == 'item3') ? 'selected="selected"': ''); ?>>Item 3</option>
<option value="item4"<?php echo ((isset($_POST['list1']) && $_POST['list1'] == 'item4') ? 'selected="selected"': ''); ?>>Item 4</option>
</select>
<?php
if(isset($_POST['list1']))
{
// Now show a second drop-down box
echo 'This is where a second drop-down box would go.';
}
?>
Something as simple as that. You can test it out if you want. But that's the basic idea of how you'd go about doing it.