If you want to include a php page depending on the varibale...
this hould help...
PHP Code:
<?php
$page = $_GET['page'];
//What to do if no page is specified in the variable
if (!$page){
$page = 'mainpage.php';
}
//include the page
include $page;
?>
This way if you typed..
pagename.php?page=page.php
it would inlude the page.php page
But if you want it so that you can type..
pagename.php?page=page1
pagename.php?page=page2
etc.
and you can then specify what page loads...this would do...
PHP Code:
<?php
$page = $_GET['page'];
//What to do if no page is specified in the variable
if(!$page){
$page = 'mainpage.php';
}
if($page == page1) {
$page = 'pagenumber1.php';
}
if($page == page2) {
$page = 'soemotherpage.php';
}
//You can then add as many more pages you want in the same way
//include the page
include $page;
?>
So if you typed..
pagename.php?page=page1
it would load pagenumber1.php
Hope this makes sense
Need any more help just ask
-James 
|