মাল্টি ডাইমেনশনাল array data get
<!-- modal processpurchaseorder -->
<div id="processpurchaseorderproduct" class="modal fade" role="dialog">
<div class="modal-dialog" style="width: 60%;">
<form action="<?php echo base_url('OrderController/savepurchaseorders');?>" method="post" >
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header" style="padding: 5px 10px;">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3 class="modal-title text-center"> Send order</h3>
</div>
<div class="modal-body" style="padding: 0px 10px;">
<table width="100%" class="table table-striped table-bordered table-hover">
<thead>
<tr style="background-color: #23ab2d;color:white">
<th>Code</th>
<th>Item</th>
<th class="text-center">Order Qty</th>
<th class="text-center">Send Qty</th>
<th>Price</th>
</tr>
</thead>
<tbody id="purchaseproductshow">
</tbody>
</table>
<input type="submit" class="btn btn-success btn-sm pull-right" value="submit" >
</div>
<div class="modal-footer" style="padding: 0;"></div>
</div>
</form>
</div>
</div>
//controller
//muliti dimenttion array data get
// **************************************************************
// * savepurchaseorders Developed By: Md.Haidar Ali *
// **************************************************************
function savepurchaseorders()
{
$pidID= $this->input->post('pidID');
$send_qty= $this->input->post('send_qty');
// echo $send_qty[1];
// die;
foreach($pidID as $key=>$val){
$qtyvalue=$send_qty[$key];
$array = array("send_qty"=>$qtyvalue);
$this->db->where("id",$val);
$this->db->update("purchase_invoice_details",$array);
// $qtyvalue=$send_qty[$key];
// echo "<pre>";
// print_r($qtyvalue);
}
}
Comments
Post a Comment