Well, there are two ways to go about this. You could send all the data needed in a JSON object and update the checkboxes using JavaScript based upon the selection or you could have the form post back to PHP to generate the new form which effectively refreshes the page.
I'm assuming you have some sort of mechanism for knowing which checkboxes go with which drop-down option(s). You'd basically just want to have a bunch of if statements to catch what the current drop-down is, and create the form based upon it. So something like:
if(!empty($_POST['selectbox1']))
{
switch($_POST['selectbox1'])
{
case 'OC-192':
$options = array('value'=>'Label', 'value2'=>'Label', 'value3'=>'Label');
break;
case 'T3':
$options = array('value'=>'Label', 'value2'=>'Label');
break;
}
foreach($options as $val => $label)
{
$checkboxes .= '<input type="checkbox" name="subelement" value="'.$val.'" id="cb'.urlencode($val).'"> <label for="cb'.urlencode($val).'">'.$label.'</label>';
}
}
That's a very simple example, but should give you an idea as to how to start.
The JSON version is a little more tricky, but you could essentially just generate all options for every menu item, and use [man]json_encode/man to send the data to the client. Then use a javascript call to inspect the JSON object and iterate over all options related to the selected item. But that's a whole other issue, and one suited for the ClientSide forum 😉