Payment options form to email

Im still getting a 404 on the file “form_to_email.php”

May be quicker to send one of us your FTP codes and we can look into the problem directly.

Oh and youve still getting a Javascript error in you script html/scripts/gen_validatorv31.js for later reference :wink:

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

Tried again 2 seconds ago, still get 404 error on page http://www.lefs.com.au/Lefs%20CD/html/form_to_email.php

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 !!

Ive just had a look at your /html/ directory on your server (add that security hole to your list of jobs to do)

http://www.lefs.com.au/Lefs%20CD/html/

The live file on the server is still called
form-to-email.php
it should be
form_to_email.php
as pointed out by Ralph above

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 now its your validation thats wrong, even when all fields are filled in it tells me it needs a Name and Email.

remove the validation for now, lets concentrate on just getting the email working, then you can play with the validation later.

I changed it for you, as it’s a bad idea to post your email details in a forum. :slight_smile:

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

Ok cheers ralph.m had me worried for a moment

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. :slight_smile:

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.

“So to remedy that change” … Please go on Mandes I’m all ears

Sorry I hit the go button too early, see my completed post #33

No worries at all Mandes, I appreciate that. So how do I go about fixing the validation now. Cheers