PHP help...

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Watch

thepurplecow

BioSpherical.netEstablished Member
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!
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Search: choose where to search from the All tab
Open the search at the top of any page. On the All tab, the list next to the search box lets you choose where to search: everything, all...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back