[eluser]vincej[/eluser]
Hi Insite - well I solved it !!!
In the end what I did was first count the size of the initial POST array, then increment the post indexes using a for loop. I feel quite proud of myself as this was a tricky one for a newb. I can run queries against the table which is nice. Thanks against for your hand you gave in arriving at the final solution.
Code:
function confirmed_Order(){
$prodid =$_POST['prodid'];
$quantity = $_POST['quantity'];
$numloops = count($_POST['prodid']);
for ($i = 0; $i < $numloops ; $i++) {
$sql ="
INSERT INTO `confirmedorder` (Prodid, quantity)
VALUES ($prodid[$i], $quantity[$i])
";
$this->db->query($sql);
}
}