1<?php
2$connect = new mysqli("127.0.0.1","root","");
3
4 if ($connect -> connect_errno)
5 {
6 echo "Failed to connect to MySQL: " . $connect -> connect_error;
7 exit();
8 }
9
10 $connect -> select_db("Your Database");
11 if ($result = $connect -> query("Your query"))
12 {
13
14 }
15 echo "<select>";
16 while($row = mysqli_fetch_array($result))
17 {
18 echo "<option>" . $row['Your columns'] . "</option>"
19 }
20 echo "</select>"
21?>