id值应该是每一行不一样,这个怎么办呢,不好意思我对PHP不熟悉。。

解决方案 »

  1.   

    取出每一条的id,然后
    <input type="text" name="beizhu<?php echo $row['id'] ?>">
      

  2.   

    <form name='form' action='' method='post'>
    <input type="text" name="re[<?php echo $row['id']; ?>] ">
    </form>
    提交后根据数组脚标循环写入数据库
      

  3.   

    我现在输入框的名字依次会是re0,re1...
    我用
    $i=0;
    while(shopcart->next())
    {
    ...
    x->res=$_POST['re[$i]'];
    $i++;
    }
    怎么得不到值?