I needed to use my URL as my variable for example test.com/user/mark I use this code
$test=explode( '/', $_SERVER['REQUEST_URI'] );
echo $test[2];
It is working properly but when I tried to access it folders are not working properly CSS and JS folder is not working, what could be the proper solution for this ?