Advertisement
uwong15

Untitled

Aug 26th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.68 KB | None | 0 0
  1. <select class="form-control" name="class" id="class" onchange="" value="--">
  2.     <option>--</option>
  3.     <option>X NET 1</option>
  4.     <option>X NET 2</option>
  5.     <option>XI NET 1</option>
  6.     <option>XI NET 2</option>
  7. </select>
  8. <input type="text" class="form-control" name="name" id="name" list="checkName" autocomplete="off" required>
  9. <datalist id="checkName">
  10.     <?php
  11.        $sql_siswa = "SELECT name,class from student order by name;";
  12.        $result = $conn->query($sql_siswa);
  13.         if ($result->num_rows > 0) {
  14.             while($row = $result->fetch_assoc()){
  15.                 echo "<option value=\"".$row["name"]."\">";
  16.             }
  17.         }
  18.     ?>
  19. </datalist>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement