heres the food order page
CODE:
Code: Select all
<?php
// Script Error Reporting
error_reporting(E_ALL);
ini_set('display_errors', '1');
include "storescripts/connect_to_mysql.php";
// If the form has been posted, process it.
if (!empty($_POST))
{
foreach ($_POST as $k => $v)
{
if ($v > 0)
{
// This is pretty messy, but it prevents having to query the database again
$details = explode('|', $k);
echo "Item: {$details[0]}<br />";
echo "Description: {$details[1]}<br />";
echo "Price: {$details[2]}<br />";
echo "Quantity: {$v}<br /><br />";
}
}
}
// Otherwise, display the order form
else
{
$sql = "SELECT id, product_code, description, units_per_product, unit_price, product_price
FROM food
ORDER BY id ASC";
$products = mysql_query($sql);
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Debug</title>
</head>
<body>
<?php if (isset($products) && $products !== FALSE): ?>
<form id="frmPurchase" action="" method="post">
<table>
<tr>
<th>Code</th>
<th>Description</th>
<th>Units Per</th>
<th>Unit Price</th>
<th>Product Price</th>
<th>Qty</th>
</tr>
<?php while ($row = mysql_fetch_assoc($products)): ?>
<tr>
<td><?php echo $row['id']; ?></td>
<td><?php echo $row['description']; ?></td>
<td><?php echo $row['units_per_product']; ?></td>
<td><?php echo $row['unit_price']; ?></td>
<td><?php echo $row['product_price']; ?></td>
<td>
<input type="text" name="<?php echo "{$row['id']}|{$row['description']}|{$row['product_price']}"; ?>" />
</td>
</tr>
<?php endwhile; ?>
<tr>
<td colspan="6">
<input type="submit" value="Place Order" />
</td>
</tr>
</table>
</form>
<?php endif; ?>
</body>
</html>
ORDER PAGE :

Confirm Order Page : This is what comes up when submitted.

Now for the merchandise ordering page
this is what i currently have:

And this is where i need help & ive tried everything i can think of, this is what i want to show when the user submits the order form. i made this page with paint.

The client has been loosing the plot over this and i really need the help
Any input, any help would be GREATLY appreciated.
Thanks In advance.