I have an email form that works just fine. Then I added 3 new fields in the form and I’m wondering how to include them in the email returned by the php file.
[CODE]$headersep = (!isset( $uself ) || ($uself == 0)) ? “rn” : “n” ;
$name = $_POST[‘name’] ;
$email = $_POST[’email’] ;
$title = $_POST[‘title’] ;
$section = $_POST[‘section’] ;
$clinic = $_POST[‘clinic’] ;
$comments = $_POST[‘comments’] ;
$http_referrer = getenv( “HTTP_REFERER” );
if (!isset($_POST[‘name’])) {
header( “Location: $formurl” );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( “Location: $errorurl” );
exit ;
}
if ( ereg( “[rn]”, $name ) || ereg( “[rn]”, $email ) ) {
header( “Location: $errorurl” );
exit ;
}
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$messageproper =
“This message was sent from:n” .
“$http_referrern” .
“————————————————————n” .
“Name of sender: $namen” .
“Email of sender: $emailn” .
“Title: $titlen” .
“Section Name: $sectionn” .
“Clinic: $clinicn” .
“————————- COMMENTS ————————-nn” .
$comments .
“nn————————————————————n” ;
mail($mailto, $subject, $messageproper,
“From: “$name” <$email>” . $headersep . “Reply-To: “$name” <$email>” . $headersep . “X-Mailer: chfeedback.php 2.07” );
header( “Location: $thankyouurl” );
exit ;
Email returns Name, email address and comments…..How do I add Title, Section Name, and Clinic in the return email message?
Best wishes,
Eye for Video