NameSilo

PHP help...

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
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
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
CatchedCatched

We're social

Escrow.com
Spaceship
CryptoExchange.com
Domain Recover

NamePros updates

Parking: a plain list of your portfolio domains
Your public portfolio page has a new option in the menu next to the sort options. "Domain list" opens a plain page with one domain name...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back