I have a layout/design called index.php - on that page I have an include for the menu (include menu.php) on the left
There is a column where I have another include (home.php) with just the home text/images etc on that page -
What I'm stumped at is: where the menu calls another page EG:about.php (all it has on it is the info and the company image) can it load into the index page, where the current (home) include is, do I need to put it in a named div? Or something like that so the menu calls to the other page to replace the current content....
That way all I have to do is just generate the page without the need to constantly regenerate all the layout and graphics....
Is there an easy way to do that?
This is some of my first attempts at php - normally I do JS or html calls...
I tried adding this to the index -
Code: Select all
<?php
if (! file_exists("$index.php"))
{
include("home.php");
}
else
{
include("$index.php");
}
?>Code: Select all
<a href="index.php?page=test;"><span>Test Item</span></a>It does'nt seem to work - is this code way off base?