to make a select box out of your db results
$query = mysql_query("SELECT field_name FROM your_table");
echo "<select name=\"field_name\">\n";
while($row = mysql_fetch_array($query)) {
echo "<option value=\"" . $row["field_name"] . "\">" . $row["field_name"] . "</option>\n";
}
echo "</select>\n";
You can add on DISTINCT or ORDER BY in your SELECT query as needed. If you want to put values into an html text field, then you run a query, return the values into an array (lets call it $foo), then output it as the value in the text field
echo "<input type=\"text\" name=\"email\" value=\"" . $foo["email"] . "\">";
Cgraz