Is there a way to get the url and all the url variables. I know $PHP_SELF gets the url and not the variable.
Yes, read the PHP Manual's appendix on predefined variables.
Which is where?
http://www.php.net/manual/en/reserved.variables.php
I am sorry but I can not find the variable.
No such thing as $PHP_SELF (unless you have register_globals on, but we'll [I'll] pretend you don't). You want $_SERVER['PHP_SELF'].
$PHP_SELF works fine for me but it does not get the url variables.
URL:
http://www.yourdomain.com/page.php?variable1=Hello&variable2=World
echo $_GET['variable1']." ".$_GET['variable2']."!"; // Output: Hello World!
See some of the other elements of $_SERVER[].
If you are looking for the exact query string, then QUERY_STRING should help you out. IF you are looking for the variables themselves, then loop through the $_GET array.
What is it you are trying to do with this?
You should stay away from $PHP_SELF in favor of $_SERVER[]. I think what you want is:
$SERVER['PHP_SELF'] - the name of the script $SERVER['QUERY_STRING'] = the query string (ie variable1=something&variable2=something_else) passed through the URL.
Jim Keller http://jim.centerfuse.net/projects/