Nick
2005.11.20, 10:38 PM
For whatever reason I can't get this to work and can't find anything about it using Google. Can anyone help me out? For some reason, when I try to pass the URL variable, it doesn't include the file at all. If I take off the URL variable it does work.
//(from index.php)
<? include("header.php?id=home"); ?>
//(header.php)
<?
$pretext = "";
if($id != "home") {
$pretext = "../";
}
?>
<div class="header">
<h2><a href="<? echo $pretext; ?>">SimReality Studios</a></h2>
<a href="<? echo $pretext; ?>music/">Music</a>
<a href="<? echo $pretext; ?>3d_graphics/">3d Graphics</a>
<a href="<? echo $pretext; ?>games/">Games</a>
</div>
//(from index.php)
<? include("header.php?id=home"); ?>
//(header.php)
<?
$pretext = "";
if($id != "home") {
$pretext = "../";
}
?>
<div class="header">
<h2><a href="<? echo $pretext; ?>">SimReality Studios</a></h2>
<a href="<? echo $pretext; ?>music/">Music</a>
<a href="<? echo $pretext; ?>3d_graphics/">3d Graphics</a>
<a href="<? echo $pretext; ?>games/">Games</a>
</div>