这是我获取数据库数据以选择框的代码,我想获得选定的值。我尝试了很多方法,但我错过了一些东西。帮我
<form id="search" action="" method="post" >
<select name="owner" id="owner">
<?php
$sql = mysql_query("SELECT designation FROM designation");
while ($row = mysql_fetch_array($sql)){
echo '<option value="'.$row['designation'].'">'.$row['designation'].'</option>';
}
?>
</select>
<input type="submit" value="Search">
</form>