我有一个问题,当我从$ _POST变量中检索值时,采用的值是最后打印的值。
<?php
foreach($mlbb as $s){
?>
<div class="col-lg-4 col-xs-6">
<!-- small box -->
<div class="small-box bg-aqua">
<div class="inner">
<h3><?php echo $s->layanan."<br>".$s->harga." Poin" ?></h3>
</div>
<form action="<?php echo base_url(). 'mlbb/beli_aksi'; ?> " method="post" id="form-satuan" >
<input type="hidden" name="id" class="form-control" value="<?php echo $s->id;?>">
<input type="hidden" name="harga" class="form-control" value="<?php echo $s->harga;?>">
<input type="submit" class="btn btn-success" value="Beli">
</div>
</div>
<!-- ./col -->
<?php } ?>