I am making my own CMS built in PHP for my own personal sites. Everything so far is going well. I've got news administration, creates pages with text, left and right blocks and a user system, with classes that can tell what state a user is (eg normal, moderator and administrator). But I have got one problem.
Because I have built my site like this:
<?
include (header.php);
mysql content retrieved
include (footer.php);
?>
In Header.php is stuff like sessions, the layout and the left blocks, and in footer.php is the right blocks and end of html.
But, for example, when I add a new block to the left, because the left blocks have already been processed in header.php, it doesn't appear, but the right blocks will, because footer.php is included after the code.
And also with logout/login, cos the header.php has already been processed, at the top of the screen it will say Login instead of "Hello UserName", until i refresh or go to the next page. Can anyone suggest what I should do with this, any ideas? I will be eternally greatful.
Thankyou.