I need to do when a link is clicked then it is opened in same frame where from it is opened.
Means, I have index.php file and it has one iframe FrameLoader
<div class='iframebox'>
<?php
if(empty($_GET['p'])){
$_SESSION['iFrameLoader']='home.php';
}else{
$_SESSION['iFrameLoader']=$_GET['p'].".php";
}
?>
<iframe src="<?php echo $_SESSION['iFrameLoader']; ?>" name="iFrameLocate" id="iFrameLocate"></iframe>
</div>
And there is three other php files, home.php, demo1.php and demo2.php
home.php
<h1>This is home page for demo</h1>
<a href='index.php?p=demo1'>Page 1</a>
<a href='index.php?p=demo2'>Page 2</a>
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.