<input type="checkbox" name="checkbox[]" 这样试试

解决方案 »

  1.   

    <form action="checkprocess.php?give_id=<?php $give_id ?>" method="post">
    <?php
    //以下是等待核实的捐助者
    $i=0;
     while($row=mysql_fetch_array($result))
    {
    $give_id =$row["give_id"];
    $give_name =$row["give_name"];

    ?> <tr align="center">

    <td align="left"> <font color="007F7F">
    <input type="checkbox" name="checkbox<?=$i?>"  value=<?php echo $give_id ?>> <?php echo $give_name; ?>
    </font></td>
    <td align="left"> <font color="007F7F"><?php echo $give_tel ; ?></font></td>

     </td>

    </tr><?php
      $i++;
    } ?>
    </tr>
    </table>
    <p>
    <table align="center">
    <tr><td>
        <input type="hidden" name="j" value="<?=$i?>"> 
        <input type="submit" name="Submit" value="通过审核"> 
     </td></tr> </table></p>
      </form>
    <? 
    //接收check.php传递过来的参数
    //echo $give_name;echo $give_tel;echo $give_address;echo $give_money;echo $give_words;echo $give_time;
    for ($i=0;$i<$_POST["j"];$i++){
    $give_id = $_POST['checkbox'.$i];
    echo $give_id;
    $sql="update give set give_check=1 where give_id='".$give_id."'";$result= mysql_db_query($dbname,$sql);//把 sql语句送到数据库中进行处理.
    if (!$result){
       echo '审核失败!请重新审核!';
    }
    else{
       echo '审核成功!';
    }
    }
    ?>