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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP_SELF complete with args? 1

Status
Not open for further replies.

miraclemaker

Programmer
Oct 16, 2002
127
GB
Is there a simple way to get PHP_SELF complete with the GET args for that page (ie the arguments that you will see in the address bar) without having to parse the $_GET array and construct the args String yourself?
 
you can write them out

<form action=&quot;$PHP_SELF?id=1&quot; method = get> Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Hmm, does this only get filled in when a page is submitted from a form?
I've tried using $_SERVER['REQUEST_URI'] and it's empty. Ah well, no matter. I've used an alternative method now. ($_SERVER[QUERY_STRING])
 
Yes, PHP can only populate the elements of $_SERVER it knows how to populate. This is true for all if its superglobal arrays. For example, $_FILES will always be there, but unless you've uploaded a file, it will be an empty array. ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top