I have a html page with a form and a php page when you submit the form. Anyway.. when you fill out the form, it will say "thank you". I get the email BUT with blank fields. why are the fields blank?? can anyone look at this and figure it out.. here is the site... www.cedarcommus.com/contact.html
<?php
/* Subject and Email Variables */
$emailSubject = 'Please show fields';
$webMaster = '[email protected]';
/*Gathering Data Variables */
$email - $_POST['email'];
$name - $_POST['name'];
$contactphone - $_POST['contactphone'];
$yourcompany - $_POST['yourcompany'];
$service - $_POST['service'];
$details - $_POST['details'];
$body = <<<EOD
<br><hr><br>
Email: $email <br>
Name: $name <br>
Contact Phone: $contactphone <br>
Company Name: $yourcompany <br>
Service Interested In: $service <br>
Comments: $details <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
</head>
<body>Thank you for your interest. We will reply to your email shortly!
</body>
</html>
EOD;
echo "$theResults";
?>
Yes but its werid when I changed it to the equal sign , i didnt recieve any email at all. I'm echoing it out right now and it shows the email address with the = sign. I'm so confused why it is working like that. is there a problem with the headers ?????
<?php
/* Subject and Email Variables */
$emailSubject = 'Please show fields';
$webMaster = '[email protected]';
/*Gathering Data Variables */
$email - $_POST['email'];
$name - $_POST['name'];
$contactphone - $_POST['contactphone'];
$yourcompany - $_POST['yourcompany'];
$service - $_POST['service'];
$details - $_POST['details'];
$body = <<<EOD
<br><hr><br>
Email: $email <br>
Name: $name <br>
Contact Phone: $contactphone <br>
Company Name: $yourcompany <br>
Service Interested In: $service <br>
Comments: $details <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
</head>
<body>Thank you for your interest. We will reply to your email shortly!
</body>
</html>
EOD;
echo "$theResults";
?>
Yes but its werid when I changed it to the equal sign , i didnt recieve any email at all. I'm echoing it out right now and it shows the email address with the = sign. I'm so confused why it is working like that. is there a problem with the headers ?????