This is what I have used and works ok. There are other traps and tests that should be added, but you get the idea.
Rick
<form method="POST">
<div align="left"><left><p>Search Mfg.
<select name="MFGName">
<?php
$hostname = "localhost";
$user = "user";
$password = "mypass";
$database = "YourDatabase";
$connection = mysql_connect($hostname, $user, $password);
mysql_select_db($database,$connection);
// build your SELECT here
$query = "SELECT MFGName FROM tblMFG ORDER BY MFGName";
$result = mysql_query($query, $connection);
if(mysql_num_rows($result)) {
// we have at least one item, so show all users as options in select form
while($row = mysql_fetch_row($result)) {
print("<option value=\"$row[0]\">$row[0]</option>");
}
} else {
print("<option value=\"\">No records were found, sorry.</option>");
}
?>
</select><input type="submit" value="Submit"></p></left></div>
</form>