PHP email form output problem

Hi first off id like to say hello, ive just been customising a site template and the contact form php script appears to be incorrect. I`ve tried to contact the templates creator, but have had no success.

The contact form is pretty simple, a name, email and message fields. The form is sending an email but i`m not getting the message text. i get something like this

"The Name Of The Sender: 1
Email: [email protected]

Subject:

Message:

IP ADDRESS: 82.28.90.77

Daniel Reed Photography" which is pretty useless. Im less than a novice and i know it could be as simple as a typo but if anyone could have a look over this id really appreciate it.

<?php //Type the receiever's e-mail address $emailAddress = "[email protected]"; //Type your Site Name $siteName = "Daniel Reed Photography"; $contact_name = $_POST['name']; $contact_email = $_POST['email']; $contact_subject = $_POST['subject']; $contact_message = $_POST['message']; if( $contact_name = true ) { $sender = $contact_email; $receiver = $emailAddress; $client_ip = $_SERVER['REMOTE_ADDR']; $email_body = "The Name Of The Sender: $contact_name \nEmail: $sender \n\nSubject: $contact_subject \n\nMessage: \n\n$contact_message \n\nIP ADDRESS: $client_ip \n\n$siteName"; $emailAutoReply = "Hi $contact_name, \n\nWe have just received your E-Mail. We will get in touch in a few days. Thank you! \n\n$siteName "; $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion(); $autoReply = "From: $receiver\r\n" . "Reply-To: $receiver \r\n" . "X-Mailer: PHP/" . phpversion(); mail( $sender, "Auto Reply: $contact_subject", $emailAutoReply, $autoReply ); if( mail( $receiver, "New E-Mail - $contact_subject", $email_body, $extra ) ) { echo "success=yes"; } else { echo "success=no"; } } ?> the website is danielreedphotography.com click the contacts link at the top to see it in action or inaction lol. many thanks, Daniel Reed

looking through the site it seems like a lot of people are having contact form php problems.

Post your form HTML

Sponsor our Newsletter | Privacy Policy | Terms of Service