- Impact
- 20
Hi,
I'm currently changing my site (www.BioSpherical.net) a little to make it easier to edit. Its now in PHP, and I'm using the <?php include('url here'); ?> command. I did this for the navigation as well, forgetting that it needs to change slightly for each page. If you see the site, in the nav, if you are at the homepage 'home' is green.
I use the following HTML for the nav:
<a class="on" href="index.php"><font color="#99CC00">home</font></a></li>
<li><a href="features.php">features</a></li>
<li><a href="demo.php">demo</font></a></li>
<li><a href="order.php">order</a></li>
<li><a href="contact.php">contact</a></li>
Now, that is how it should be for the homepage. But, using the PHP include that's what it will be on every page.
What I would like to know is, is there a command which would mean the code would change depending on which page the visitor was on? So the on class and the text colour would change??
Thanks!
I'm currently changing my site (www.BioSpherical.net) a little to make it easier to edit. Its now in PHP, and I'm using the <?php include('url here'); ?> command. I did this for the navigation as well, forgetting that it needs to change slightly for each page. If you see the site, in the nav, if you are at the homepage 'home' is green.
I use the following HTML for the nav:
<a class="on" href="index.php"><font color="#99CC00">home</font></a></li>
<li><a href="features.php">features</a></li>
<li><a href="demo.php">demo</font></a></li>
<li><a href="order.php">order</a></li>
<li><a href="contact.php">contact</a></li>
Now, that is how it should be for the homepage. But, using the PHP include that's what it will be on every page.
What I would like to know is, is there a command which would mean the code would change depending on which page the visitor was on? So the on class and the text colour would change??
Thanks!








