<?
switch ($_GET["abc"])
{
case "def":
$file="/format.php"
break;
case "ghi":
$file= "/ghi.php"
break;
default:
$file="default.php";
return;
}
include_once($file);
?>
in your code, there is no data set into $def variable! if you put a variable into a link:
http://www.somewebsite.com/index.php?site=1
then in index.php you can check like this:
if($_GET["site"]==1)
include("mainpage.php");
or with a switch case:
switch($_GET["site"])
{
case "1":
include("mainpage.php");
break;
case "2":
include("site2.php");
break;
default:
include("404_error.php");
break;
}