PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm working with these codes to render a contact form, but I can't seem to find what's wrong with it...clearly I'm missing something, the validation works perfectly fine but after the form is submitted nothing happens. Your help would be greatly appreciated
Jonah Bron wrote:Do you mean that the email doesn't send? Do you have error reporting on? Try echoing your validated variables right before the mail() function.
Isn't that already set in the code? I'm not entirely sure where it's suppose to go. The form validates properly but nothing shows up in my inbox.
There is no email in the $mailto variable. I'll assume you removed it to post the code here.
Do you get the "you email has been sent" message? If you do, then it might be a problem with the mail() function. Try it without all of the headers (like this)
Jonah Bron wrote:There is no email in the $mailto variable. I'll assume you removed it to post the code here.
Do you get the "you email has been sent" message? If you do, then it might be a problem with the mail() function. Try it without all of the headers (like this)
Yup I removed the email variable, and I tried it without all the headers but that doesn't seem like it's working I modified the code below to send the email but don't know how I can add the validation portion:
After the function validateEmail($email) variable I get error messages. I must be missing something since it worked before but now it's not working after I modified it...any suggestions?