[specific db connection and query and select here]
$result = mysql_query($q,$c);
while ($x < mysql_num_rows($result)):
$contents = mysql_result($result, $x, 'spec_val');
$contents_array[$x] =$contents;
$x++;
endwhile;
$r = "<select name='selected_craft' class='time_reg_win'>\n";
for($i =0; $i < sizeof($contents_array[$i]);$i++)
{
$r = $r."<option value='".$contents_array[$i]."'>"
.$contents_array[$i]."\n";
}
$r = $r."</select>";
mysql_close();
print $r;//r is the string that forms the drop menu
?>