title: PHP navigation menu
body: <p>I am making a website as part of a college assignment. I have a navigation list for my pages styled using CSS so when a page is selected the link appears bold with an image beside. I was wanting to keep the style of this menu however move this part of the html code to a .php file and just include it on each of the pages for code re-use.</p>
  
  <p>Easy enough to do however because I have a class set to determine which page is selected an change the look of the link how would I go about passing this to the PHP file - Is it possible?</p>
  
  <p>Code snippets below...</p>
  
  <p>HTML list currently:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li class="selected"&gt;&lt;a href="index.html"&gt;Home&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="login.html"&gt;Members Login&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Music Categories&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Contact Us&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>CSS for the selected page:</p>
  
  <pre><code>nav ul li.selected a
  {
  color:#fff;
  font-weight:bold;
  background:url(images/music_note2.png) center left no-repeat;
  }
  </code></pre>
  
  <p>Is there some sort of code I can use the pass the name of the page? Appologies I have never used php. Not sure if it matters but later on I will need to also hide or show certain links on the menu depending on whether the user is logged in</p>