title: link session in php loaded in single frame
body: <p>I need to do when a link is clicked then it is opened in same frame where from it is opened.</p>
  
  <p>Means, I have <strong>index.php</strong> file and it has one iframe <strong>FrameLoader</strong></p>
  
  <pre><code>&lt;div class='iframebox'&gt;
  &lt;?php
  if(empty($_GET['p'])){
     $_SESSION['iFrameLoader']='home.php';
  }else{
     $_SESSION['iFrameLoader']=$_GET['p'].".php";
  }
  ?&gt;
      &lt;iframe src="&lt;?php echo $_SESSION['iFrameLoader']; ?&gt;" name="iFrameLocate" id="iFrameLocate"&gt;&lt;/iframe&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>And there is three other php files, home.php, demo1.php and demo2.php</p>
  
  <p>home.php</p>
  
  <pre><code>&lt;h1&gt;This is home page for demo&lt;/h1&gt;
  &lt;a href='index.php?p=demo1'&gt;Page 1&lt;/a&gt;
  &lt;a href='index.php?p=demo2'&gt;Page 2&lt;/a&gt;
  </code></pre>
  
  <p>It open in same frame but also create index.php inside of index.php. so how to fix this for open in same frame other sub pages and with similar layouts.</p>