centerwork Posted September 7, 2008 Share Posted September 7, 2008 I have looked all over and I can seem to find anything on this topic. Here is what I am looking to do. 1) Pull out what is in the users address bar. 2) Pull out what page the user is on without having to pass a variable from the previous page. Any help would be appreciated. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted September 7, 2008 Share Posted September 7, 2008 Any information like that is contained within the $_SERVER superglobal. Try taking a look at it: echo '<pre>'.print_r($_SERVER,1).'</pre>'; Quote Link to comment Share on other sites More sharing options...
tibberous Posted September 7, 2008 Share Posted September 7, 2008 2) Pull out what page the user is on without having to pass a variable from the previous page. mod_rewrite It's hard. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted September 7, 2008 Share Posted September 7, 2008 How on earth does mod_rewrite have anything to do with what page you are on? Quote Link to comment Share on other sites More sharing options...
centerwork Posted September 7, 2008 Author Share Posted September 7, 2008 I was able to get the page using the following code. $sess_id = $_SESSION[$sessVar]; //Pulls Out Page from Address Bar $url = $_SERVER['PATH_INFO']; $pattern = "(/admin/)"; $page = preg_replace ($pattern , ' ' , $url); $page = trim($page); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.