This is some of the form code:
Code: Select all
<td align="center"><input type="text" size="3" name="<?php echo 'cust['.$lrow['product_id'].']'; ?>" id="cust" value="<?php echo ''.$lrow['customer_price'].''; ?>"></td>
<td align="center"><input type="text" size="3" name="<?php echo 'buy['.$lrow['product_id'].']'; ?>" id="buy" value="<?php echo ''.$lrow['buy_price'].''; ?>"></td>
This code runs through the first input from the form:
Code: Select all
while(list($prod, $sep) = each($_POST["cust"]))
{
echo 'TEST: '.$prod.' = '.$sep.'<br />';
}
Where the echo currently exists i will enter an update query. I need to work out how to add the 2nd form input to that loop and therefore the query.
As it is now i could do another loop for the 2nd variable and it would work, but i'm wanting to get it all into one loop and one query in the end. The problem isn't with the query it's getting the loop to go through all the variables at the same time.