NOTE: I have just tested this and it doesn't work. You may need to play around a bit.
Try this:
<script type="text/javascript">
window.onload=function()
{
bp='http://www.yoursite.com/lib/signatures/', //base url of your images
imgnum=3, //Number of images. This should match on your comboboxes options.
thumb=document.getElementById('bgimage'), //id of your image that will be changing
combobox=document.getElementById('sig'); // id of your combobox.
combobox.onchange=function()
{
bgimage.src=bp+'<?php echo $pilotinfo->code; ?>'+'.png';
}
}
</script>
For the dropdown:
<dt>Signature Background</dt>
<dd><select id="sig">
<?php
foreach($bgimages as $image)
{
if($userinfo->bgimage == $image)
$sel = 'selected="selected"';
else
$sel = '';
echo '<option value="'.$image.'" '.$sel.'>'.$image.'</option>';
}
?>
</select>
<br>
<img src="http://www.yoursite.com/lib/signatures/<?php echo $pilotinfo->code; ?>.png" id="signature">
</dd>