I have a website I’m trying to insert a form on, but even when I copy a form that I know works (it is live and currently emailing works) over to this site (both the html with the form on it, and the php file that has the form process php), and then it won’t email. Is there any reason why this would happen?
Here is the code, FYI:
HTML:
[php]
First Name* | Last Name* | |
Street Address* | ||
City* | State/Province* | Zip/Postal Code* |
Email Address* | Phone | |
Comments | ||
PHP (on contact_process.php):
[php]<?php
if (isset($_POST[“submit_button”])) {
$recipient = "[email protected]";
$subject = "Contact us "; //. $_POST["requesttype"]." request...";
$header = "From: Server <[email protected]>\n"."Reply-To: [email protected]\n";
$content = "Contact Us ". $_POST["requesttype"]." Submission
First name: ". $_POST["name"] ."
Last name: ". $_POST["lastname"] ."
Company: ". $_POST["company"] ."
Street Address: ". $_POST["street"]. "
City: ". $_POST["city"]. "
State/Province: ". $_POST["state"]. "
Zip: ". $_POST["zip"]. "
E-Mail: ". $_POST["email"]. "
Phone: ". $_POST["phone"]. "
Comments: ". $_POST["comments"]. "
Linking page: ". $_SERVER['HTTP_REFERER'];
mail($recipient, $subject, $content, $header);
}
?>[/php]