Basically i have this setup:
index.php - this file uses include()'s for header and footer graphics, sets up css files etc. etc. it has code to include the config files(database connection, authorisation etc) and to include whatever part of the site is tagged onto the url(eg index.php?action=addnews) using $_GET[].
At the moment, in the files it requests, some require other queries to make sure the user has permissions to access that area of the script. If the user has no access then it sends a header(Location: blah) to redirect the user.
My problem is that when i have a graphical theme for the site etc, which is of course included before the redirect header() is, the redirect won't work because the http headers have already been sent.
Can anyone suggest other ways of redirecting users so that its not possible for them to disable javascript etc and still get through?
Anyone?
I'm thinking that maybe i could completely rewrite the code with security in mind and that could completely avoid the circumstances that are happening at the moment.