title: php check if link has been clicked
body: <p>Hi I'm a novice at php could some please help. I'm making a website it has a menu, I need it so that if a link like "link1" is clicked page1.php will load into the the mainSection div and if link2 is clicked page2.php will load in mainSection etc. so all the pages: page1, page2, page3 etc will load into this single page depending on what link has been clicked. Is this possible I don't know where to start. Thanks</p>
  
  <pre><code>    &lt;body&gt;
          &lt;?php
              &lt;ul&gt;
                  &lt;li&gt;&lt;a href="#" name="link1"&gt;link 1&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#" name="link2"&gt;link 2&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#" name="link3"&gt;link 3&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#" name="link4"&gt;link 4&lt;/a&gt;&lt;/li&gt;    
              &lt;/ul&gt;
          ?&gt;
  
         &lt;div id="mainSection"&gt;
              &lt;?php
          if (link1 == true){
               include 'page1.php';
          }
          if (link2 == true){
              include 'page2.php';
          }
          if (link3 == true){
              include 'page3.php';
          }
          if (link4 == true){
              include 'page4.php';
          }
              ?&gt;  
          &lt;/div&gt;
      &lt;/body&gt;
  </code></pre>