Hi, I’m coding a site, and what i’ve done is made a header.php page and inserted it into pages using
[php]<?php
require “header.php”
?>[/php]
But I want to know if something is possible in it.
This particular template has links along the top, and suppose you are on the homepage, the homepage link is suppose to be highlighted.
[php]
<?php
if( $userdata[‘session_logged_in’] )
{
echo ’
}
else
{
echo ' <ul id="nav">
<li id="current"><a href="index.php" class="style26">Home</a></li>
<li><a href="/forum">Forums</a>
<li><a href="register.php">Sign Up</a></li>
<li><a href="login.php">Login</a></li>
<li><a href="#">Contact Us </a></li>
</ul>';
}
?>
[/php]
My question is, since this is in the header.php, everytime i go to a page with header.php in it, the home link is highlighted
[php]
I want to know if it is possible to add something in the code so i can make it like IF you are on home, it’s highlighted, and IF you are on signup that’s highlighted, and if you arent on any in the navbar nothings highlighted…
anyhelp?