Jump to content

[SOLVED] What is in the user address bar & what page is the user on?


centerwork

Recommended Posts

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.

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);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.