- 论坛徽章:
- 0
|
<?php
include 'include.php';
if(!$db_connection)
echo "无法连接数据库";
if (!mysql_select_db('doctor',$db_connection))
echo ('<br>select the database doctor error<br>'.mysql_error());
$sql="select name from ks";
echo '<html> <body> <select name=ks_name> ';
if ( $result = mysql_query($sql,$db_connection)){
$i=0;
while($rows=@mysql_fetch_array($result))
{
echo "科室<option value='$rows[name]'>$rows[name]</option>";
$rows_result[$i][0]=$rows["name"];
$i++;
}
$num=$i-1;
//mysql_free_result($result);
echo '</select> </body> </html>';
}
else echo "执行SQL语句($query)失败:".mysql_error();
//$result=@mysql_query($query)
////////////////////////////////////////////////////////////////////
$sql="select name from doctor";
echo '<html> <body> <select name="sign"> ';
标红的地方该如何取得一级里面的参数呢?希望能帮助我 |
|