关于php用option显示mysql的内容

## 无法显示select传到的全部的值,只显示一个值

代码如下:

 <html>
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 </head>
<body>
<?php
  include("conn.php");
$result=mysql_query("SELECT stu.name,stu.id FROM stu LEFT OUTER JOIN grade ON(stu.id=grade.id) WHERE grade.chinese is null ORDER BY stu.id ASC");
$row=mysql_fetch_array($result)
?>
    <h3>增加学生信息</h3>
    <form action="action.php ? action=addcj" method="post">
    <table><input type="hidden"  name="id" value="<?php echo $row['id']?>"? >
     <?php echo $stu['id'];?>

            <tr>姓名
            <select name="id">
       <?php     while($row=mysql_fetch_array($result))
            {?>
                <option value="<?php echo $row['id'];?>" >
            <?php echo $row['name'];?>          </option><?}
 ?>         
            </select>
      </tr>            
                <td>语文</td>
                <td><input type="text" name="chinese"></td>
            </tr>           
<tr>
                <td>数学</td>
                <td><input type="text" name="math"></td>
            </tr>
            <tr>
                <td>英语</td>
                <td><input type="text" name="english"></td>
            </tr>           
<tr>
                <td><a href="index.php"> 返回 </a></td>
                <td><input type="submit" value="添加"></td>
                <td><input type="reset" value="重置"></td>
            </tr>       
            <table>
        </form>                  
</body>
</html>

查询如下:
图片说明

php显示如下:
图片说明

兄弟 你在while循环之前调用了一次mysql_fetch_array了已经 所以里面的指针已经指向第二了 所以你循环出来的只有一个 另外使用mysqli会更快

请把

<?php print__r(mysql_fetch_array($result)) ?>

打印出来看一下呢
一个数组的循环输出