I want to create a select box with a search option just like this but the option is from my database.
The code I have so far
<form name="form1" action="" method="post">
<table>
<tr>
<td>
<select name="id" class="form-control selectpicker">
<?php
$res=mysqli_query ($link,"select id, nama from peminjaman");
while ($row = mysqli_fetch_array($res))
{
echo "<option>";
echo $row["id"].". " .$row["nama"];
echo "</option>";
}
?>
</select>
</td>