Ok ralph.m some good news I got a 404 error page not found, at least its trying to do something now, still no email though. I was wondering if that reflects back on the PHP page now, with reference to this "header(‘Location: thank-you.html’);"Cheers
When did you last try that Mandes and have you been reading the post since you submitted your first post as I think I’ve corrected that issue but the javascript may be the problem now. Cheers
You wont be recieving any mail yet (even if you can access the page) as you are specifying a send address of email@mysite.com.au which Im guessing isnt your real server address !!
Ok Mandes strange you where able to post before my post because I had only just changed it. I wasn’t getting anything prior to that no errors nothing at all at least now where getting some errors happening which is something, so what do you think the javascript problem could be. I did change the javascript on the Order CD.html page from the original that came with the PHP code but I haven’t touched the “html/scripts/gen_validatorv31.js” . So is the “email@mysite.com.au” in that javascript page or somewhere else, as that sounds strange to me seeing that all the code came with “email@mysite.com” no “au” in it all…OH ok I see its in the PHP code I wonder what happened there. I’ll change it immediately, that will make a difference for sure. Cheers for that
Ok Mandes I removed the validation like you suggested the thank you page loads but no email, I was under the impression that the thank you page would also be generated as an email. I have no idea whether it generated an email to the owners email address or not as I can’t access their email but acting as a user, it certainly didn’t generate an email to me
No, the thank you page is the web page they arrive at if the form submits successfully. If they are just returned to the form page, it can be confusing as it’s not clear if the form sent or not.
The idea of the form is that it sends and email to you when the form submits, not an email to the person submitting the form. (You can change that, but that’s how it’s set up at the moment.)
Ok thanks ralph.m appreciate that. I just got feedback from the owner she recieved my order WOOOHOOO what a marathon this has been. So all that remains is to get the validation sorted out and to generate an email to the client, WOW you guys are absolutely AWESOME!!
AT the moment you will always get the thank you page whether the email was sent or not.
So to remedy that change
//Send the email!
mail($to,$email_subject,$email_body,$headers);
//done. redirect to thank-you page.
header('Location: thank-you.html');
to
//Send the email!
if (mail($to,$email_subject,$email_body,$headers)){
header('Location: thank-you.html'); //done. redirect to thank-you page
}else{
echo '******* ERROR EMAIL NOT SENT ********'; // can be tidied up later
}
Its also worth noting that PHP only ackowledges that it has passed the email to the smtp server for sending, it does not tell you that the mail was actually sent by the server.