I am working on a form where I need to load a second dropdown based on the selection of the first selection. The first selection is populated from an XML response... how do I use the Key Value to load my second dropdown?
<select name='Pub_ID' id='s1' onchange=AjaxFunction();> <?php $feed_url = 'http://mywebsite.com/xml=?affiliate_id=0&affiliate_name=&accmanager_id=0&tag_id=0&start_at_row=1&row_limit=10000&sort_field=affiliate_id&sort_descending=FALSE'; $xml = simplexml_load_file($feed_url); foreach($xml->affiliates->affiliate as $affs){ echo "<option value='".$affs->affiliate_id."'>" . $affs->affiliate_name . "</option>"; } ?> </select>