there are several ways, but I will show my
First, take the data you want to retrieve from the query:
$query = mysql_query("SELECT name, id FROM users");
Then repeat the selection and then the while loop to iterate through the various parameters:
<?php
echo "<select name='user'>";
while ($temp = mysql_fetch_assoc($query) {
echo "<option value='".$temp['id']."'>".$temp['name']."</option>";
}
echo "</select>";
?>
The result should be:
<select name="user">
<option value='1'>User name 1</option>
<option value='2'>User name 2</option>
</select>
, :)