I am relatively new to PHP, trying to learn more every day.
I have been enjoying using Server Side Includes in my sidebars, footer etc with good results, much handier and more efficient!
I would like to do the same for the header and main site navigation.
However, the main problem that I am not sure how to deal with comes from having 'active' links (differently coloured menu tab for the page the user is on) in my menu.
Here is a small menu example:
<li><a href="nav.php" class="active">Home</a></li>
<li><a href="products2.php">Products 2</a></li>
<li><a href="products3.php">Products 3</a></li>
When the user is on the Home page, the class is set to active - i.e. a different colour.
If I do a simple server side include with my navigation this will of course be across all the pages. Can anyone please advise on what I need to do to make the menu work correctly across all the pages? (have different tabs selected for each respective page).
Any help / insight is much appreciated.