I have a form where I am editing my orders.On my edit order page, I am breaking down my orders.For example, Order details (Customer name,address etc) and then order items like this:
Order Details:
<form name="edit_order" id="edit_order" method="post">
<?
if ($order_details) {
// print_array($order_details);
foreach ($order_details as $key => $link) {
?>
<div width="200">
<div><b>Product: </b> <br><?=$link->product_name?> - <?=$link->product_id?></div>
<div><strong>Cost:</strong><br>£<?=$link->unit_cost?></div>
<div><strong>Pack Qty:</strong><br><input name="quantity" id="quantity" value="<?=$link->quantity?>" style="width:50px;" /> </div>
<div><strong>Pack Cost:</strong> <br><input name="pack_cost" id="pack_cost" value="<?=$link->pack_cost?>" style="width:50px;" /> </div>
<div><strong>Pallet Qty:</strong><br><input name="pallet_quantity" id="pallet_quantity" value="<?=$link->pallet_quantity?>" style="width:50px;" /> </div>
<div><strong>Pallet Cost:</strong><br><input name="pallet_quantity" id="pallet_quantity" value="<?=$link->pallet_unit?>" style="width:50px;" /> </div>
</div>
<?
}
}
?>
MY Question is :
How can I retrieve these values for multiple fields(input boxes) on next page?
For example,if I edit "pallet_quantity" and "pack_cost" of 10 products on edit order page then how can i retrieve them on next page using the loop to save them in the database?.
When I try to display values on web page like this : print($_POST['pack_cost']) ,it gives me single value.How can I loop through the POST array to display and save my edited values into the database?.
Help me plz.