I have this form sending mail but its not posting the user input details. Any help is greatly appreciated.
PHP for sending mail.
<?php
$EmailFrom = "email sender";
$EmailTo = "emal recipiant";
$Subject = "Contact";
$Name = Trim(stripslashes($_POST['Name']));
$BName = Trim(stripslashes($_POST['BName']));
$Tel = Trim(stripslashes($_POST['Tel']));
$Email = Trim(stripslashes($_POST['Email']));
$Message = Trim(stripslashes($_POST['Message']));
// validation
$validationOK=true;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "BName: ";
$Body .=$BName;
$Body .= "\n";
$Body .= "Tel: ";
$Body .= $Tel;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=index.html\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>
The form data originates from
<section id="sign-up">
<div class="container">
<div class="row">
<div class="col-lg-12">
<form method="post" action="contactengine.php">
<div class="form-group">
<label for="Name">Name</label>
<input type="text" class="form-control" id="name" placeholder="Name">
</div>
<div class="form-group">
<label for="BName">Business Name</label>
<input type="text" class="form-control" id="BName" placeholder="Business Name">
</div>
<div class="form-group">
<label for="Tel">Phone Number</label>
<input type="number" class="form-control" id="Tel" placeholder="xxx-xxx-xxxx">
</div>
<div class="form-group">
<label for="Email">Email</label>
<input type="email" class="form-control" id="Email" placeholder="Email">
</div>
<div class="form-group">
<label for="Message">Tell us about how we can help.</label>
<textarea class="form-control" id="Message" cols="50" rows="5" placeholder="Write text here..."></textarea>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
</div>
</div>
</section>