O
Omnipotent
Guest
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 I'm using:
<?php
// Declare Variables
// Collect post data
$to = '[email protected]';
$subject = 'Halo Chiefs Contact Form';
$from = $_POST['email'];
$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!';
header( "Location: http://www.halochiefs.net/contact" );
} else {
echo 'An error occured! Refresh the page and try again.';
}
?>
It only sends textfield4
My code I'm using:
<?php
// Declare Variables
// Collect post data
$to = '[email protected]';
$subject = 'Halo Chiefs Contact Form';
$from = $_POST['email'];
$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!';
header( "Location: http://www.halochiefs.net/contact" );
} else {
echo 'An error occured! Refresh the page and try again.';
}
?>
It only sends textfield4