Use $_SERVER['QUERY_STRING']- which contains bits after ?:
switch($_SERVER['QUERY_STRING']) {
case 'home':
echo 'admin home';
break;
}
You can use this method even more and have the following URLs:
http://mysite.com/admin/?users/user/16/
explode(), , :
$args = explode('/', rtrim($_SERVER['QUERY_STRING'], '/'));
$method = array_shift($args);
switch($method) {
case 'users':
$user_id = $args[2];
doSomething($user_id);
break;
}
, MVC. , ? , mod_rewrite Apache, , .