Continue Shopping\n"; exit(); } $n=1; while($row = mysqli_fetch_assoc($result)) #25 { foreach($row as $field => $value) { if($field != "Order_ID") { $items[$n][$field]=$value; if($field == "Part_ID") { $sql_prt = "SELECT Part_Desc,Part_No,Part_Unit,Part_Unit_Qty FROM parts WHERE Part_ID = '$row[Part_ID]'"; $result_prt = mysqli_query($cxn,$sql_prt) or die("sql_prt: ".mysqli_error($cxn)); $row_prt = mysqli_fetch_array($result_prt); $items[$n]["Part_Desc"]=$row_prt['Part_Desc']; $items[$n]["Part_No"]=$row_prt['Part_No']; $items[$n]["Part_Unit"]=$row_prt['Part_Unit']; $items[$n]["Part_Unit_Qty"]=$row_prt['Part_Unit_Qty']; } } } $n++; } ?> IMS "; echo ""; echo""; echo"
"; echo "
"; echo "Ship To: "; echo "
$ship_name
$order_attn
$ship_street $ship_street2
$ship_city, $ship_state $ship_zip\n"; echo "
Arrive date: $ship_date"; echo "
Order Number: $table_name"; echo "
"; echo "
"; echo "

Please allow three (3) days for delivery."; echo "

"; echo "
"; echo "
"; echo "\n"; echo ""; echo ""; foreach($table_headers as $header) { echo "\n"; } echo ""; for($i=1;$i <=sizeof($items);$i++) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
$header
$i{$items[$i]['Part_ID']}{$items[$i]['Part_No']}{$items[$i]['Part_Desc']}{$items[$i]['Order_Amount']} - {$items[$i]['Part_Unit']} of {$items[$i]['Part_Unit_Qty']}

\n"; echo "
"; ?>