I have been using PHP to navigate through my web pages. I have it set up so that each time the main index page is loaded, it loads the same header and footer and a different main section. The problem is, I have to have a start page such as index.html that passes a value to the index.php page. Maybe this will make it a little clearer.
Here is a link on the index.html page
<a href="index.php?nav=main">
Then when the index.php page is loaded, here is the script that executes
<?php
$nav = $HTTP_POST_VARS['nav'];
include ("chunks/header.chunk");
include ("chunks/$nav.chunk");
include ("chunks/footer.chunk");
?>
I would like to bypass the html page, and just have the PHP page load but when you load the PHP page the first time, it gives me the error that nav is undefined. Is there a better way to do what I am trying to accomplish, or is there something that I should add to make this work? I've tried adding an "if" statement, but I can't seem to get that to work. Thanks for the help.