Setup:
I have a website that uses a header.php and a footer.php that ALL pages include so that I'm not repeating code.
The site also uses a login that uses cookies to write the login info and jumps to the main menu if a login was succesful by doing:
header("Location: main.php");
Now since my header.php includes all the <head> stuff I get the error:
PHP Warning: Cannot add header information - headers already sent by header.php
How can I avoid this? I may be understanding headers and stuff wrong as well, been searching for a resolution but can't find one.
I also tried
header('Location: main.php', FALSE);
but no difference
.
.
.
header doc
thx in advance.