如何将复选框添加到行结果中


How to add a check box to a row result

我缺少什么获取

分析错误:语法错误,意外的"checkbox"(T_STRING),应为","或";"在C:''examplep''htdocs''index.php中的第70行

  if(mysql_num_rows($result) !== 0)
            {
            while($row=mysql_fetch_array($result))
                {
                echo '<tr>
                <td>'.$row['aid'].'</td>
                <td>'.$row['Name'].'</td>
                <td>'."<input type="checkbox" class='form' value="1" name="checkbox[]" />".'</td>
                </tr>';
                }
            }

更正该行

<td>'."<input type="checkbox" class='form' value="1" name="checkbox[]" />".'</td>

像这个

<td>'."<input type='checkbox' class='form' value='1' name='checkbox[]' />".'</td>

试试这种方法,

if(mysql_num_rows($result) !== 0)
        {
        while($row=mysql_fetch_array($result))
            {
            echo '<tr>
            <td>'.$row['aid'].'</td>
            <td>'.$row['Name'].'</td>
            <td><input type="checkbox" class="form" value="1" name="checkbox[]" /></td>
            </tr>';
            }
        }