Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Current page with URL/Passed variables

Status
Not open for further replies.

ScottCybak

Programmer
Sep 29, 2000
48
CA
I was wondering if there was any other method to grabbing the full url of the current page.

Basically, i want to use PHP_SELF, but get all the variables passed to it in the URL..

So, if the url were:


my result string (could be an array, depends what's easier/quicker)would be

testing.php?Num=1&Rec=3

I'd like to do this without having to manually define all variables in a function and check for each when the script runs, but imagine this could possibly be what i have to do.

I appreciate any response and/or advise given! Scott Cybak
Nighthawk Transport Inc.
 
If you are using a PHP v4.2.0, use $_SERVER["REQUEST_URI"].

If you are using an older version of PHP, the information is available in $HTTP_SERVER_VARS["REQUEST_URI"]


You should get "/testing.php?Num=1&Rec=2".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top