Just one thing for you to ensure not doing is including the file extension inside the URL. That is a security hazard unless the files you are including are in a specific directory.
Example:
PHP Code:
<a href="?page=downloads.php">Downloads</a>
<?php
if (isset($_GET['page']))
$iframe = $_GET['page'];
else
$iframe = "default.php";
?>
<iframe src="<? echo $iframe; ?>">
The problem with this is someone can include their own script in your site by typing this on your site:
?page=http://mysite.com/myscript.php
A way to avoid that is using either of these methods:
1) Add the extension of the file as you include it
PHP Code:
<a href="?page=downloads">Downloads</a>
<?php
if (isset($_GET['page']))
$iframe = $_GET['page'];
else
$iframe = "default";
?>
<iframe src="<? echo $iframe . ".php"; ?>">
2) Force the file to be located in a particular directory
PHP Code:
<a href="?page=downloads.php">Downloads</a>
<?php
if (isset($_GET['page']))
$iframe = $_GET['page'];
else
$iframe = "default.php";
?>
<iframe src="includes/<? echo $iframe; ?>">
-Matt