title: How to have a fix php webpage, that has a fix navigation-bar and footer
body: <p>I would like to have a webpage, which has the same horizontal navigation bar, and footer, but the content will be loaded dynamically, depending on what the user clicks on the nav-bar. </p>
  
  <p>for ex </p>
  
  <pre><code>&lt;div class="nav-bar"&gt;
  /* this is always same mainTemplate.php */
  &lt;/div&gt;
  
  &lt;div class="main-content"&gt;
  /* here i load different pages like content1.php or content2.php or content3.php, depending what the user clicks on the different nav-bar sections/buttons */ 
  &lt;/div&gt;
  
  &lt;footer&gt;
  /* this is always same mainTemplate.php */
  &lt;/footer&gt;
  </code></pre>
  
  <p>how to do it with javascript or ajax or php or something? </p>