Jump to content

ndgz102489

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ndgz102489's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Never mind. I got it. Thanks everyone!
  2. Gotcha. Thank you. So, I got the form to work, but I receive an e-mail and the results copies what was written in between the quotation marks in the PHP file. How do I get the form to write the appropriate information such as the recipient's name, e-mail, phone number, and message?
  3. This is the error that I've received from the error log.
  4. Here is the PHP code: <?php var_dump($_POST); // Check for empty fields if (isset($_POST['button'])) { empty($_POST['name']) empty($_POST['email']) empty($_POST['phone']) empty($_POST['message']) echo "You gotta fill it out!"; return false; } $name = strip_tags(htmlspecialchars($_POST['name'])); $email = strip_tags(htmlspecialchars($_POST['email'])); $phone = strip_tags(htmlspecialchars($_POST['phone'])); $message = strip_tags(htmlspecialchars($_POST['message'])); // Create the email and send the message $to = 'ned@nerdcorestudio.com'; // Add your email address inbetween the '' replacing yourname@yourdomain.com - This is where the form will send a message to. $subject = "Website Contact Form: $name"; $text = "You have received a new message from your website contact form.\n\n"."Here are the details:\n\nName: $name\n\nEmail: $email\n\nPhone: $phone\n\nMessage:\n$message"; $header = "From: noreply@yourdomain.com\n"; // This is the email address the generated message will be from. We recommend using something like noreply@yourdomain.com. mail($to,$subject,$text,$header); header("Location: index.html?mailsent") return true; if(mail($to, $subject, $text, $header)) { echo 'Thank You!'; } else { echo 'boo, no email was sent'; } ?>
  5. Greetings, I have a contact form on my website, but it is not working. When I fill out the form and press "Submit", I don't receive any inquiries to my e-mail. Now, I am not familiar of PHP, but I have found a simple contact form template in the interwebs. I had followed the instructions on how to make to use it, but it doesn't seem to work. I am unsure if I am missing a code, but it is giving me a headache. I've attached the screenshots.
×
×
  • Create New...