PDA

View Full Version : PHP Include.. again so it sems



Dejavu
11-25-2005, 07:58 AM
Hi iv just joined these forums today, iv set up a site with PHP Includes i think i t would be easier to give the URL to the site www.dejserve.com/atlan , that site uses,


<IMG SRC="images/index_04.gif" ALT="" width="190" height="647"><div style="position: absolute; top: 293; left: 118; width: 168; height: 556">

<?php include('links.htm'); ?>
</div></TD>

I want to make the links on that page change the Include path for the main page,


<TD>
<IMG SRC="images/index_05.gif" ALT="" width="610" height="647"><div style="position: absolute; top: 285; left: 303; width: 580; height: 556">
<?php include('home.htm'); ?>
</div></TD>

i was wondering if someone could help me do this.

Thanks, Dejavu

nikomou
11-25-2005, 10:39 AM
take a look at this thread (http://www.dynamicdrive.com/forums/showthread.php?t=5517&highlight=php+include).

Dejavu
11-25-2005, 11:30 AM
im not using iframes

Dejavu
11-25-2005, 12:48 PM
$pages = array('home', 'etc');

if (isset($_REQUEST['p']) && in_array($_REQUEST['p'], $pages))
{
$include = $_REQUEST['p'];
} else {
$include = 'home';
}

include(''. $include .'.htm');

sorted, this worked, so long as index.php?p=whatever page