If you want it so you type... mypage.php?page=name
this should do the job...
PHP Code:
<?php
//Get Page variable
$page = $_GET['page'];
//If no page is specified
if( !$page ) {
$framelocation = "main.htm";
}
if( $page == 'google' ) {
$framelocation = "http://google.com";
}
if( $page == 'yahoo' ) {
$framelocation = "http://yahoo.com";
}
//Then add the $framelocation variable to the iframe tag
?>
<html>
<body>
<iframe height="400" width="600" src="<?php echo $framelocation ?>"> </iframe>
</body>
</html>
Or alternatively if you want it like...
mypage.php?page=name.htm or...
mypage.php?page=http://google.com
This would do the job...
PHP Code:
<?php
//Get Page variable
$page = $_GET['page'];
//If no page is specified
if( !$page ) {
$page = "main.htm";
}
//Then add the $framelocation variable to the irframe tag
?>
<html>
<body>
<iframe height="400" width="600" src="<?php echo $page ?>"> </iframe>
</body>
</html>
Hope this helps
Need any more help just ask
-James 
|