Forum Moderators: coopster
What I want to know now is how can I now format that email to be HTML (especially tables)?
I tried adding lines like this to my message
"<bold>LITERATURE REQUEST FORM SUBMISSION from navco.org<bold>\n\n" .
and also added this in the variables
$mime_type = "text/html";
but my email comes as text, witht he line looking like this:
<bold>LITERATURE REQUEST FORM SUBMISSION from navco.org<bold>
Also - can my PHP page have instructions to send two differetn emails - one to me, and another to the submitter (each email would have different contentand formattin) - or can I somehow tell a form to submit to two different PHP files - each sending thier own emails....
Thanks!
I want the email i get to only have a line break if there is data in a field I write to the email.
For example my form has many rows each with a quantity field...in the email I get, I want the results to be written each on a new line but only if the field had a value:
Item 1 Quantity=34
Item 4 Quantity=7
Item 9 Quanity=2
I want the email i get to only have a line break if there is data in a field I write to the email.
This should just be a case of inspecting the value for each submitted form item before incorporating it into your email. For example, here is a very generic loop that will create an email message body for every item within an HTTP POST, but only if the item has a value:
$message = "";
foreach($_POST as $key => $value) {
if ($value) {
$message .= $key . " = " . $value . "\n";
}
}
... then email $message as normal.