SleePyCode Forums

Special Site & Other Boards => PasteBin => Topic started by: SleePy on May 17, 2007, 12:01 AM

Title: PasteBin - 1179360070
Post by: SleePy on May 17, 2007, 12:01 AM
echo '

';

print_r($_SERVER['PATH_INFO']);

// Open it up
$url = explode('/', $_SERVER['PATH_INFO']);

// Get ride of the junker.
if($url[0] == '')
unset($url[0]);

// Ok.. Split it again.
foreach($url as $tempurl)
$urlnew[] = explode(',', $tempurl);

// Finally get it out of here.
foreach($urlnew as $urlout)
$_GET[$urlout[0]] = $urlout[1];

// And get rid of the extras;
unset($url, $tempurl, $urlnew, $urlout);


echo 'GET Variables-->', print_r($_GET), echo '
';

if(isset($_GET['action']))
echo 'We are set
';

if(isset($_GET['action']) && $_GET['action'] == 'home')
echo 'We have it.';

echo '
';
?>