I’ve been really annoyed recently. This form mailer I have sends me blank emails whenever someone visits the page with the form. I have to scan through these emails to find the “actual” mail from people.
Here is a sample of my code:<?php $name = $_GET['name']; $email = $_GET['email']; $experience = $_GET['experience']; $project = $_GET['project']; $agree = $_GET['agree']; $comments = $_GET['comments']; $to = 'email@example.com'; $subject = 'Programmer'; $body = " Name: $name Email: $email Experience: $experience Project: $project Agree: $agree Comments, etc: $comments "; mail($to, $subject, $body); ?> You can contact me through this form without the hassle of looking up my email address!
[Once you have sent this form once, nothing will have changed except the text boxes clear; don’t worry. That’s normal. It just means the email was sent.]Name:
Previous experience (link to website):
Are you willing to do your best?: YesNo
Reason why you’re applying & comments:
Also, when I tried to redirect users to a thank you page when you fill out the form, it redirects the user, but the form isn’t sent to my email.
Any help is appreciated. Thanks so much!