title: Include page in a div using onclick
body: <p>I want to include some pages into a div but I don't know how. The code with the problem is below</p>
  
  <p>I want to include a page in a content div, so when I click on contact in the navigationbar the contact.php needs to be loaded in the index.php's content div and when I click on about us in the navigationbar the about.php page is included into the index.php's content div..</p>
  
  <pre><code>&lt;html&gt;
     &lt;body&gt;
       &lt;div id="navbar"&gt;
         &lt;ul&gt;
           &lt;li&gt;
              home
           &lt;/li&gt;
           &lt;li&gt; 
              about us
           &lt;/li&gt;
           &lt;li&gt;
              contact
           &lt;/li&gt;
         &lt;ul&gt;
       &lt;div id="content"&gt;
           &lt;!--so when the user clicks on contact us there needs 
               to be an include in this div wich includes the contactus.php page.
           --&gt;
           &lt;?php include 'contactus.php'; ?&gt;
       &lt;/div&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>