as far as the include itself goes, simply do NOT blindly include any file passed through the url
include ($_GET['page']); // gigantic security risk
include ($_GET['page'] . '.php'); // not much better, still bad
include ('pages/' . $_GET['page'] . '.php'); // still bad, they could use ?page=../../config
// good, only include files we have specifically allowed
switch ($_GET['page']) {
case 'about':
include 'about.php';
break;
case 'foo':
include 'path/to/script.php';
break;
case 'bar':
include 'path/to/bar.html';
break;
default:
include 'hompage.php';
}