Note that header() has a caveat, like setcookie() also has:
You cannot output anything to the browser before calling setcookie() or header(). Even a blank space prior to your opening <?php tag will cause an error, much less a print statement.
Thanks for your time!! G'luck,