php contact form help

Hello,

I recently copy and pasted some code from a help site to get my contact form up and running. I followed all of the instructions and put in my information. Email, return message formatting ect.

The email actually goes through but I don’t receive any of the info except for the message part. Any help would be appreciated as I am completely new to PHP.

My html code is below followed by my php.

Many thanks.

Name

Email

Subject

Message

<?php $emailSubject = 'HappinessDesigns!'; $webMaster = '[email protected]'; $Name = $_POST['Name']; $Email = $_POST['Email']; $Subject = $_POST['comments']; $Message = $_POST['Message']; $body = <<<EOD Name: $name Email: $email Subject: $Subject Message: $Message EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); $theResults = <<<EOD sent message
Your message has been successfully sent. We will be contacting you shortly. Thank You.
EOD; echo "$theResults"; ?>

Easy one! ! !

CAPS are very very important in PHP. You set up your variables correct, but, use a cap on them. ($Email)

Then, inside your email, you display them using lower case! ($email)

These are TWO different variables. $email is NOT $Email… Common mistake. That should fix you up!

It worked! Thank you so much! I was staring at it so much yesterday that my eyes were crossed. Now how do I give you good Karma points? :smiley:

Well, thanks for the offer, but, Guest and New members can not give out Karma points.
(LOL, of course that is who I help the most…)

Thanks anyway! I will mark this solved! CYA in the Bitstream…

Sponsor our Newsletter | Privacy Policy | Terms of Service