在这个论坛发布html的代码,会出来<br data-filtered="filtered"> 不知道为什么
 
 <form class="J_ajaxForm" action="{@url:app/index/submit_buy}" method="post">
  <div class="table_list">
  <div class="sl_card_log_list">
    <table  class="sl_card_log_table">
<thead>
              <tr>
<td width="100">积分类型</td>
                <td width="100">积分面值</td>
<td width="100">是否购买</td>
              </tr>
              </thead>
<!--#
$number = 0;
foreach($cardlist as $key => $value){
...............................
$number++;
#-->
      <tr>
    <td><input  type="hidden" name="cardtype" value="{$value['cardtype']}"/>{$value['cardtype']}</td>
<td><input  type="hidden" name="credit" value="{$value['credit']}" />{$value['credit']}</td>
<td>   <dd><button type="submit" class="btn btn_submit J_ajax_submit_btn mr10">购买</button></dd>   </td>
  </tr>
    </table>
  </div>
   </form> 
---------------------------- public function submit_buyAction() {
 list($cardtype, $credit) = $this->getInput(array('cardtype', 'credit'));
$this->showError('输出:'.'积分类型:'.$cardtype.'。积分面值:'.$credit.'。);
}

----------------------------上面是一个html跟php控制。
提问:html循环输出后,无论我点击哪一行的购买按钮,得到的$cardtype, $credit 两个变量,都是最后一行的。
我希望能够点击哪一行就可以得到哪一行的$cardtype, $credit。
有人能帮下么?