选择科室后,对应员工姓名根据选择的科室获取,怎么做到。
两个列表的代码:
```
echo "-请选择- ";
<?php
@include "conn.php"; //链接数据库
$gzh_num_result=mysql_query("select gzh_num , gzh_name from gongzhong where gzh_renum=0 order by gzh_num ;");
while($gzh_num_row=mysql_fetch_array($gzh_num_result))
{
list($gzh_num,$gzh_name)=$gzh_num_row;
echo "<option value=".$gzh_num.">".$gzh_name." </option>";
// echosuboption($gzh_num,@$_GET['gzh_num']);
};
?>
</select>
</td>
<td><select name="yg_num" >
echo "<option value=0>-请选择- </option>";
<?php
$yg_num_result=mysql_query("select yg_num , yg_name from yuangong where gzh_renum=01 order by yg_num ;");
while($yg_num_row=mysql_fetch_array($yg_num_result))
{
list($yg_num,$yg_name)=$yg_num_row;
echo "<option value=".$yg_num.">".$yg_name." </option>";
};
?>
</select></td>