Forum Moderators: coopster
<?php
require_once( $_GET['page'] );
?>
Thats your basics right there.
However, you should really validate the file they are requesting otherwise any script kiddie hacker could try something like index.php?page=/etc/passwd
So you probably want somethng more like..
[pre]
$allowedPages = array ( 'home.html', 'away.html', 'contact_us.html' );
if ( isset($_GET['page']) and array_search($_GET['page'], $allowedPages) )
require( $_GET['page'] );
else
require( 'home.html' );
[/pre]