Hi I'm trying to design something from the ground up, using several php sources as inspirations (as indicated by the TPL suffixes). I can't get it to work so please if you could indicate what I'm doing wrong here:
<?php
if (!isset($_GET['page']))
{
$page = "news.php";
include ($page);
} else {
$page = $_GET['page'];
if ($page != 'news') {
include ('header.tpl');
include ($page.'.html');
include ('footer.tpl');
}
else {
include ('news.php');
}
}
?>
Basically I want to display news.php if there is no URL variable and/or if the URL variable is not given. Otherwise pick up and construct the site by adding up the includes that are shown (header + content + footer).