I am designing a website for Grocery Pick Up and Delivery service. I created a form with all the necessary input areas (name, address, delivery time, etc.)
I am trying to use PHP to collect the data of the form and email it to a specified email address.
I have the message sending correctly, but it is a blank message that is sent.
What I'm asking is......Is there a way to collect the ENTIRE FORM including all fields and email it. Or do I have to specify each individual field to collect
here is the PHP I have...
I'm guessing that this part of the code is where the form or fields should be listed for submission.
I am trying to use PHP to collect the data of the form and email it to a specified email address.
I have the message sending correctly, but it is a blank message that is sent.
What I'm asking is......Is there a way to collect the ENTIRE FORM including all fields and email it. Or do I have to specify each individual field to collect
here is the PHP I have...
Code:
<?php
} else {
error_reporting(0);
$recipient = 'dkaeck@corsp.org';
$subject = "Order Form";
$from = stripslashes($_POST['Name']);
$msg = "Message from: $from\n\n".stripslashes($_POST['MsgBody']);
$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers.= "From: $from\r\n";
if (mail($recipient, $subject, $msg, $headers))
echo nl2br("<b>Your Order Has Been Sent</b>
To: $recipient
Subject: $subject
Message: Attached Order Form
$msg");
else
echo "Your Order Failed To Send";
}
?>
I'm guessing that this part of the code is where the form or fields should be listed for submission.
Code:
$msg = "Message from: $from\n\n".stripslashes($_POST['MsgBody']);