Page 1 of 1

Help with _SERVER["xxx"] vars

Posted: Wed Jun 25, 2003 6:08 pm
by future_man
Hello,

I'm trying to find a way to extract the original querystring (admin.issuesIndex) from a page's url, rather than the one being appended to it once the page is reloaded (?from=25) in the example below.

http://www.website.com/index.php/admin. ... ex?from=25

I've tried $_SERVER['PHP_SELF'] but it returns: index.php

While $_SERVER["REQUEST_URI"] returns: ?from=25

I need to return: admin.issuesIndex.htm

Is there an easy way to do this?

Thanks,
John

Posted: Thu Jun 26, 2003 2:20 am
by delorian
You should use $_SERVER['PATH_TRANSLATED']:

Code: Select all

$your_page = strrchr($_SERVER['PATH_TRANSLATED'], "/");

Thanks!

Posted: Thu Jun 26, 2003 8:43 am
by future_man
Thanks Delorian!

Posted: Thu Jun 26, 2003 4:50 pm
by delorian
You're welcome!