<?php 
include "../koneksi.php";
$data = mysqli_query ($koneksi, " select 
                                        DetailEkspedisi_ID,
                                        EkspedisiID,
                                        Sopir,
                                        NoPolisi,
                                        NoHP
                                from 
                                detailekspedisi 
                                where EkspedisiID = '$_GET[ekspedisi]'");

?>
<table class="table">
<tr>
    <td width="29%">Nama Supir  :</td>
    <td><select class="form-control" aria-label="Small" id="detail_ekspedisi" name="detail_ekspedisi">
		<option selected></option>
		<?php 
		while ($row = mysqli_fetch_array ($data))
		{
		?>
		<option value="<?php echo  $row['DetailEkspedisi_ID']; ?>"><?php echo $row['Sopir']; ?></option>
		<?php } ?>
	</select></td>
</tr>
</table>
<div id="container2"></div>

<script>
       $('#detail_ekspedisi').on('change', function(){
		$.get('dn3.php?id=' + $('#detail_ekspedisi').val(), function(data) {
				//fungsi eksekusi func. Ajax
				$('#container2').html(data);
		});
	  });
</script>
