Ok well I want it to take the data from $bodymail and place it in a hidden field to then be used in the form....the form works to my knowledge and well it shows a ">then the submit button and has hte invoice 2 times i only want it once.
if ($item1check == "yes" || $item2check == "yes" || $item3check == "yes" || $item4check == "yes" ||$item5check == "yes") {
echo "$item1v$item2v$item3v$item4v$item5v";
include ('formvalues.php');
} else {
$bodymail = '<div id="layer1"><table width="40%" border="0" cellspacing="0" cellpadding="0"><tr><td><b>Item</b></td><td><b>Quantity </b></td><td><b>Totals</b></td></tr><br>' . $item1qt . $item2qt . $item3qt . $item4qt . $item5qt . '<br><tr><td></td><td></td><td><b>' . $total . '<br>Total</b></td></tr></table><br><br></div>';
echo "<div id=\"layer1\"><table width=\"40%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><b>Item</b></td><td><b>Quantity </b></td><td><b>Totals</b></td></tr><br>$item1qt$item2qt$item3qt$item4qt$item5qt<br><tr><td></td><td></td><td><b>$total<br>Total</b></td></tr></table><br><br><form action=\"formssent.php?sent=yes\" method=\"post\"><input type=\"hidden\" name=\"body\" value=\"$bodymail\"><input type=\"submit\" value=\"Submit Order\"></form></div>";
}
} else {
$validitems = '<font color=red>Did not enter an item to choose</font><br>';
$validnew = no;
}
The email dispatch thing:
<?php
if ($sent == yes) {
$headers = 'From: trevor_longbottom@hotmail.com\r\n';
$headers .= 'Cc: $mailinvoice\r\n';
mail ('trevor_longbottom@hotmail.com', 'Form Test E-mail', $body, $headers);
echo 'Mail Sent' . $body . 'there';
} else {
echo 'You have viewed this page incorrectly';
}
?>