PHP Email Form...help!?

  • Thread starter Thread starter Omnipotent
  • Start date Start date
O

Omnipotent

Guest
Ok, this is so annoying, I've been at it for a week, and asked many questions, but none of the codes work good enough. I have a code, but my problem is (read below). Can someone just take that code and make it work properly? Thank you.

I have a php form ( halochiefs.net/contact/ ) and it works, but it only sends what they type in textfield4. I have the code, but how do I make it send every field?

My Code:
<?php
// Declare Variables
// Collect post data
$to = '[email protected]';
$subject = 'Halo Chiefs Contact Form';
$from = $_POST['[email protected]'];
$message = $_post['textfield4']

// Set up the headers
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n";

$mail = mail($to, $subject, $message, $headers);

if($mail) {
echo 'Mail sent! Please press 'back,' to continue.';
header( "Location: http://www.halochiefs.net/contact" );
} else {
echo 'An error occured! Refresh the page and try again.';
}
?>
 
Back
Top