I created a form for potential customers to request a quote. It gathers info and uses sendmail (mail($headers, etc.) to gather the entered info and send it to our CM Manager.
The mail part works fine. But I can’t seem to get it to go to the thank you page (or back to the form page, if the mail function fails). The funny thing is, at one point it worked – I’m not sure why it’s not working now. There’s every chance it could be my host, but before ask for help there, I wanted to be sure I didn’t have some noob error in my code.
After the mail function is called, I use the following to try to redirect:
[php]<? php[/php]
if ($mailsend === TRUE) {
echo ‘’;
exit;
} else {
echo ‘’;
echo ‘’;
exit;
}
[php][/php]
I tried header(location()), etc. first, but got the ever-popular “Headers already sent …” message.
Also, the PHP is external to the shtml files (request_quote.shtml and thank_you.shtml) and I am using a full URL (http://www.bardonsoliver.com/newbnocm/thank_you.shtml, etc.) to point the way to the files.
If there’s anything else you need to know in order to help me, please let me know. I have all kinds of error checking turned on and I’m not getting any errors back – but I don’t know if I would, if the problem’s in the JS.
Thanks for any help.
Janet