Msg#: 4629197 posted 8:07 am on Dec 10, 2013 (gmt 0)
The problem is that they all end up with a blank white screen and a PHP print message like: Form Sent
They all do that, but it's so lame. Who wants to end up with a black screen and no links! You should end up on a page of your website.
So I'm trying to direct it to the URL of one of my webpages, and inserted the code you see below. I understand it is failing because you can only use header location at the start of your php file. But you don't want to change the location before executing the php?
Msg#: 4629197 posted 11:26 am on Dec 11, 2013 (gmt 0)
You can keep the <html><body> et cetera if you make a page to go with it.
if (long string of conditions covering all the things that can go wrong with user input such as malformed e-mail address, missing text et cetera) echo (wide array of messages telling human user they did something wrong) else (pretty thank-you text)
and then the rest of your every-page boilerplate winding up with </body></html>
Msg#: 4629197 posted 12:01 pm on Dec 23, 2013 (gmt 0)