...

View Full Version : Dynamic URL Help



BriggsROTC
02-26-2007, 01:43 AM
Okay. I need help with coding my site.
Say my url to my links page is
"mysite.com/page/links.php"
I want the url to be like this
"mysite.com/index.php?page=links"
Or
"mysite.com/?page=links"
Does anyone know how to code it?
It's going to have have more than one page.

Thank You.

papa_face
02-26-2007, 02:56 AM
$page = $_GET['page'];

if (empty($page))
{
//index.php code
}
else
{

switch ($page)
{
case "links":
require("link.php");
break;

case "otherpage":
require("page.php");
break;
}

}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum