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