$value) { if($field != "order_id") { $items[$n][$field]=$value; if($field == "Cust_ID") { $sql_2 = "SELECT Cust_Desc FROM customers WHERE Cust_ID = '$row[Cust_ID]'"; $result2 = mysqli_query($cxn,$sql_2) or die("sql_2: ".mysqli_error($cxn)); $row2 = mysqli_fetch_assoc($result2); $items[$n]["Cust_Desc"]=$row2['Cust_Desc']; } if($field == "Ship_Location_ID") { $sql_3 = "SELECT Ship_Name FROM ship_locations WHERE Ship_Location_ID = '$row[Ship_Location_ID]' AND Cust_ID = '$row[Cust_ID]'"; $result3 = mysqli_query($cxn,$sql_3) or die("sql_3: ".mysqli_error($cxn)); $row3 = mysqli_fetch_assoc($result3); $items[$n]["Ship_Name"]=$row3['Ship_Name']; } } } $n++; } ?>
All pending orders.\n"; echo ""; echo "