Jump to content

Need help with a PHP email form


Wyqued

Recommended Posts

I have a contact form on my website that sends the info to my email (basic email php form). However, I have been having some clients mention that they have submitted a form, and I haven't gotten the information. Whenever I submit tests, they always come through.

 

You can see the form at: http://wyqued-design.com/quote-web-design-development.html and the PHP action is at http://wyqued-design.com/mailer.php

 

Any suggestions??

Link to comment
https://forums.phpfreaks.com/topic/192454-need-help-with-a-php-email-form/
Share on other sites

<?php
if(isset($_POST['submit'])) {
$to = "[email protected]";
$subject = "A Message from the Website";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$phone_field = $_POST['phone'];
$time_field = $_POST['time'];
$url_field = $_POST['url'];
$project = $_POST['project'];
foreach($_POST['check'] as $value) {
$check_msg .= "Checked: $value\n";
}
$pages = $_POST['pages'];
$heard = $_POST['heard'];
$message = $_POST['message'];

$body = "
From: $name_field\n 
E-Mail: $email_field\n 
Phone Number: $phone_field\n 
Best Time: $time_field\n 
URL: $url_field\n
Interest:\n $project\n 
$check_msg\n
#of pages:\n $pages\n 
Message:\n $message\n
They heard about Wyqued Design though: $heard\n";

header ('Location: http://wyqued-design.com/thank-you.html');
mail($to, $subject, $body);
} else {
echo "blarg!";
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.