The index.php page looks like this:
<?php
$section = 'home';
?>
<?php include ("http://leonpaternoster.com/inc/header.php"); ?>
<?php include ("http://leonpaternoster.com/inc/navbar.php"); ?>
<img src="images/russia.jpg" alt="Slightly short-sighted but eager designer at work" height="333" width="760" class="bigpic">
<div id="content">
<div id="left-col">
<h2>Simple, accessible web design</h2>
<p>I design web pages that make it easy for your <em>users</em> to find the information they need. That means you make more <em>money</em> when I design your pages.</p>
<p>I focus on:</p>
<dl>
<dt>Usability</dt>
<dd>All my design is based on studies of user behaviour and user testing. This means that your users will be able to locate the information they need as effieciently as possible, which means more business for you.</dd>
<dt>Accessibilty</dt>
<dd>I use layout, wording and typography to ensure that as many users as possible can access the information on your website.</dd>
<dt>Speed</dt>
<dd>I code websites as efficiently as possible, removing unnecessary content. This means that your users will find information as quickly as possible.</dd>
</dl>
<p class="cta">Find out <a href="about.html">more</a>, <a href="contact.html">contact me</a> or see my <a href="prices.html">services and prices</a>.</p>
</div>
<?php include ("http://leonpaternoster.com/inc/right-col.php"); ?>
<?php include ("http://leonpaternoster.com/inc/footer.php"); ?>
The navbar.php file looks like this:
<div id="navbar">
<?php
echo $section;
?>
<ul>
<?php if ($section == 'home') { ?>
<li class="current">Home</li>
<?php } else { ?>
<li><a href="http://leonpaternoster.com/index.php">Home</a></li>
<?php } ?>
<?php if ($section == 'about') { ?>
<li class="current">About</li>
<?php } else { ?>
<li><a href="http://leonpaternoster.com/about.php">About</a></li>
<?php } ?>
<?php if ($section == 'contact') { ?>
<li class="current">Contact</li>
<?php } else { ?>
<li><a href="http://leonpaternoster.com/contact.php">Contact</a></li>
<?php } ?>
<?php if ($section == 'prices') { ?>
<li class="current">Prices</li>
<?php } else { ?>
<li><a href="http://leonpaternoster.com/prices/index.php">Prices</a></li>
<?php } ?>
<?php if ($section == 'examples') { ?>
<li class="current">Examples</li>
<?php } else { ?>
<li><a href="http://leonpaternoster.com/examples/index.php">Examples</a></li>
<?php } ?>
</ul>
</div>
In my the-last-programming-I-did-was-on-an-Amiga way, could this be anything to do with scope (i.e. $section is local to the index.php page)?
Thanks for your help,
Leon