[RESOLVED] How can I get header() to work? I can't put it before the output
My index.php is constructed in such a way that I can't figure out how to use header() before any of the included php files.
The thing is: I always stay on index.php, in the MAIN div because I use $_GET variable to define actions (such as action=login, =displaycategories, =viewpost) and I use include files, depending on which action is triggered.
So when I use the login feature, I can't use header() to redirect the browser to index.php, because output has already been generated in the header.
How can I solve this problem?
Below is my code for index.php.
Thanks a lot
<center>this is the header</center>
// THIS is where all the PHP stuff happens.
<?php include ('include/leftmenu.php');?>
<center>this is the footer</center>