Hi all,
I had an earlier post that I solved myself, but now I have another issue I am not clear on. Previous post
This code shows what they are ordering and the amount, but I cannot figure how to pass THIS onto the sendmail.php page as one variable or array.
<html>
<head><title>process.php</title></head>
<body>
<form action="sendmail.php" method="post" name="SendOrder" id="SendOrder">
<?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 } ?>
<?php
foreach($_POST['order'] as $key => $ID){
$total += ${'price_'.$ID};
}
echo "The Total is $"."$total<br>";
?>
<p> </p>
<p>
<input type="submit" name="Submit" value="Submit the order">
</p>
</form>
<p> </p>
</body>
</html>
That way, I can just send that as 1 variable with this code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>sendmail</title>
</head>
<body>
<?
$message = " ALL the items ordered from the process4.php page.";
mail( "me@my.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: [url]http://www.me.com/thankyou.html[/url]" );
?>
</body>
</html>
Thanks,
Don