Extra fields in main body and php required.

Posted on 16th Feb 2014 by admin

I'm new to PHP so please be gentle. I have a little php script below that works well.
The "$msgVar" goes into the body message of the email. How can I effect additional
fields that can be filled with information that also go into the body of the email in such
a way that they have there own seperate fields of answers with atleast a double space
between each field that is answered. For example: With thanks. Brian

Answer One:

Answer Two:

Answer Three:


<?
if ($send=="yes") {
$to = "my@address";
$subject = "$subjectVar";
$body .= "$msgVar";
$from = "$nameVar";
$tfrom = "From: <$emailVar>";
mail($to,$subjectVar,$msgVar,$tfrom);
}
echo "&errormessage=Email has been sent&";
?>

Other forums