Hi all,
I am trying to compare data from $_POST['Net'] which has 6 elements to check to see if the data has changed in the form when submitted.
Below is the Post array from form.
array(16) { ["Submitted"]=> string(4) "true" ["NetValue"]=> string(1) "0" ["ProductID"]=> array(6) { [0]=> string(5) "76458" [1]=> string(5) "76459" [2]=> string(5) "76460" [3]=> string(5) "76461" [4]=> string(5) "76462" [5]=> string(5) "76463" } ["Quantity"]=> array(6) { [0]=> string(1) "1" [1]=> string(1) "2" [2]=> string(1) "2" [3]=> string(1) "1" [4]=> string(1) "1" [5]=> string(1) "1" } ["Nominal"]=> array(6) { [0]=> string(4) "5001" [1]=> string(4) "5001" [2]=> string(4) "5001" [3]=> string(4) "5001" [4]=> string(4) "5001" [5]=> string(4) "5001" } ["Department"]=> array(6) { [0]=> string(1) "4" [1]=> string(1) "4" [2]=> string(1) "4" [3]=> string(1) "4" [4]=> string(1) "4" [5]=> string(1) "4" } ["Unit"]=> array(6) { [0]=> string(5) "25.00" [1]=> string(5) "25.00" [2]=> string(5) "25.00" [3]=> string(5) "80.00" [4]=> string(6) "205.00" [5]=> string(6) "120.00" } ["Discount"]=> array(6) { [0]=> string(4) "0.00" [1]=> string(4) "0.00" [2]=> string(4) "0.00" [3]=> string(4) "0.00" [4]=> string(4) "0.00" [5]=> string(4) "0.00" } ["Net"]=> array(6) { [0]=> string(5) "25.00" [1]=> string(5) "50.00" [2]=> string(5) "50.00" [3]=> string(5) "80.00" [4]=> string(6) "205.00" [5]=> string(6) "120.00" } ["VATCode"]=> array(6) { [0]=> string(2) "T3" [1]=> string(2) "T3" [2]=> string(2) "T3" [3]=> string(2) "T3" [4]=> string(2) "T3" [5]=> string(2) "T3" } ["VAT"]=> array(6) { [0]=> string(4) "5.00" [1]=> string(5) "10.00" [2]=> string(5) "10.00" [3]=> string(5) "16.00" [4]=> string(5) "41.00" [5]=> string(5) "24.00" } ["ProductCount"]=> string(1) "6" ["NetTotal"]=> string(6) "530.00" ["VATTotal"]=> string(3) "106" ["OrderTotal"]=> string(6) "636.00" ["CheckInButton"]=> string(14) "Check In Items" }
This is the output from SQL
`25.00
50.00
50.00
80.00
205.00
120.00
`
This is my PHP query
$productSQL = $Database->Execute("SELECT * FROM POProducts inner join PODepartments ON PODepartments.PODepartmentID = POProducts.PODepartmentID inner join PONominalCodes ON PONominalCodes.PONominalCodeNumber = POProducts.POProductNominalCode WHERE POID = " . $POID . " ORDER BY POProductID asc");
while ($rowProduct = mysql_fetch_array($productSQL))
{
echo "<br>" . $rowProduct['POProductNet'];
echo $PostProducts[] = $_POST['Net'];
}
How can i best use this code or other suggestion
Thanks In advance
D