/    Sign up×
Community /Pin to ProfileBookmark

Need help with email form

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 ;[/CODE]

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

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@Eye_for_VideoauthorFeb 10.2010 — Now I can't get the script to kick in the error page response if some form fields are left empty.
[CODE]$errorurl = "www.cataractvideo.com/cv/physicians/error.html" ;[/CODE]
What am I missing?

EfV
×

Success!

Help @Eye_for_Video spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.8,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...