Home › Forums › Back End › Try out my first PHP web app! › Reply To: Try out my first PHP web app!
September 15, 2014 at 3:07 pm
#183172
Participant
Well for one, for some reason header() functions do not work on my web server, only on my localhost.
This:
header("Location:dashboard.php");
Is incorrect. You need to use a fully qualified URL:
header("Location: http://example.com/dashboard.php");
Ive read online that if the browser receives any HTML tag before the header tag, it will not work, and I do indeed have HTML tags before my header tags on this pageā¦
It’s not “HTML tags,” it’s “any output” (even blank lines, or a BOM if your text editor adds one). Do you understand how HTTP headers work?