-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompleteorder.php
More file actions
28 lines (20 loc) · 938 Bytes
/
completeorder.php
File metadata and controls
28 lines (20 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
include 'ShippingController.php';
$controller = new ShippingController();
$rows = $controller->getOrderDetails($_POST["orderNumber"]);
$partNumArray = array();
//get array of partNums
foreach($rows as $row)
{
array_push($partNumArray,$row[0]);
}
//set a session variable of $rows
$_SESSION["partDescriptions"] = $controller->shippingSearchDatabase($partNumArray);
$controller->displayOrderDetails($rows);
//"PRINT" (because we don't actually print it) a shipping label, packing list, and invoice with the data provided and return to main page.
echo '<h3 align="center"> A packing list, invoice and shipping label have been printed.</h3>';
echo '<form method="post" action="shipping.php">';
echo '<table align="center"><th></th><tr><td><input type="submit" name="setShipped" value="Set as shipped" /></td></tr></table>';
echo '<input type="hidden" name="orderNumber" value="'.$_POST["orderNumber"].'"/>';
echo '</form>';
?>