Hi All,
I have a post that is resolved and works great, but I just thought of having PHP add up the total of all the items ordered from this post My post that is resolved .
Here is another post that show how to do this, but I cannot seem to apply this technique to my code. Previous Add variable link
Here is the code I have form my process page.
<html>
<head><title>process.php</title></head>
<body>
<?php if(isset($_POST['order'])){ ?>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<th>ID</th>
<th>Item</th>
<th>Quantity</th>
<th>Price</th>
</tr>
<?php foreach($_POST['order'] as $key => $ID) { ?>
<tr>
<td><?php echo $ID; ?></td>
<td><?php echo $_POST['name_'.$ID]; ?></td>
<td><?php echo $_POST['quantity_'.$ID]; ?></td>
<td><?php echo $_POST['price_'.$ID]; ?></td>
</tr>
<?php } ?>
</table>
<?php } ?>
</body>
</html>
I know I am close with this process page, and this may be very easy for you to resolve, but I am a little confused here.
Thanks a bunch,
Don