<?php
$koneksi_db = mysql_connect("localhost", "root", ""); //membuka koneksi ke database
mysql_select_db("db_hclab", $koneksi_db); //proses masuk ke database
$sql = "
SELECT
`tbl_getdata`.`instrument_id`
FROM
`tbl_getdata`
GROUP BY
`tbl_getdata`.`instrument_id`
";
$query = mysql_query($sql);
?>
<select class="form-control" name="id_kategori">
<option value=""></option>
<?php
while($hasil = mysql_fetch_array($query)){
?>
<option value="<?php echo $hasil["instrument_id"];?>"><?php echo $hasil["instrument_id"];?></option>
<?php
}
?>
</select>
No comments:
Post a Comment