<?php $i = 1; ?>
<form action="/order/pay" method="post">
<?php foreach($this->cart->contents() as $goodsinfo) {?>
...
<?php echo form_input($i.'[rowid]', $goodsinfo['qty']); ?>
....
<?php $i++;
}?>
<input type="submit" value="确认订单" class="formbutton" />