<select name="id_customer" id="id_customer" class="form-control" onChange="showCustomer(this.value)">
<?php
echo"<option value='$id_customer' "; echo"> $id_customer</option>";
$s="select * from `tb_customer`";
$q=getData($conn,$s);
foreach($q as $d){
$id_customer0=$d["id_customer"];
$nama_customer=$d["nama_customer"];
echo"<option value='$id_customer0' ";if($id_customer0==$id_customer){echo"selected";} echo"> $nama_customer ($id_customer0) </option>";
}
?>
</select>
0 Komentar