Now, I'm actually trying to do some moderate lifting. I have a group of pages which are going to have a common structure as follows:
Code: Select all
if (user is logged in and administrator) {
show administrative tool
}
else {
chastise user for being in administrative area
}Code: Select all
<?php include ("top.php");?>
/*Show Administrative Tool Here*/
<?php include ("bottom.php");?>It appears that an include has to be a balanced chunk of PHP code which could stand on its own.
Is there a workaround, or will I be forced to keep the logic in each of the pages?
Thanks for any assistance