Re: Accessing URL parameters



On Mon, 31 Dec 2007 18:45:07 +0100, Aaron Gray <ang.usenet@xxxxxxxxx> wrote:

"Rik Wasmus" <luiheidsgoeroe@xxxxxxxxxxx> wrote in message
news:op.t37my9gb5bnjuv@xxxxxxxxxxxxxxxx
On Mon, 31 Dec 2007 18:24:28 +0100, Aaron Gray <ang.usenet@xxxxxxxxx>
wrote:

How do I access URL parameters, and ideally as an associative array ?

Many thanks in adance,

Do you want to examine the URL string?
http://www.php.net/parse_url
http://www.php.net/parse_str

Or in the current request, it's offcourse in the $_GET array.

parse_url() looke helpful, but I wanted the current pages URL parameters, is
the $_GET ?

The parameters from the query string indeed.

http://www.example.com/path/to/file.ext?foo=foz&bar=baz

...will result in a $_GET array while running file.ext:
array(
'foo' => 'foz',
'bar' => 'baz')

If you want other information as well, search the $_SERVER array for your needs.
--
Rik Wasmus
.



Relevant Pages

  • URL Set rule invokes Web Proxy Filter denied connection
    ... The request is being made to www.google.ca in the browser and I've ... created the following URL Set: ... The DMZ in question has a private class c address range assigned ... NLB is enabled on the 2 nodes in this array for this ...
    (microsoft.public.isaserver)
  • Re: Waiting for mutiple objects
    ... each array size equal to the size of threads in the pool. ... and are designed to unblock a thread to process the client request. ... When any worker thread has finished processing it ... It's like you tried as hard as you can to make a bad design. ...
    (comp.unix.programmer)
  • Re: Waiting for mutiple objects
    ... each array size equal to the size of threads in the pool. ... and are designed to unblock a thread to process the client request. ... When any worker thread has finished processing it ... Main dispatcher thread then signals ...
    (comp.unix.programmer)
  • Re: Waiting for mutiple objects
    ... each array size equal to the size of threads in the pool. ... and are designed to unblock a thread to process the client request. ... call WaitForMultipleObjects to wait on the "process" event array. ... Main dispatcher thread then signals ...
    (comp.unix.programmer)
  • Re: Getting the dynamic name with $_REQUEST[] , Pls help
    ... Keeping a separate table for the "more file upload". ... If the user closes after simply uploading the files without submitting the whole project information, or an exception occurs then the db table with extra files and url is inserted un-necessary. ... At the end of submitting the full project information in the db the array values will get stored in the corresponding url and file table which is the child table which has got the FK key points to the corresponding project table. ... How come you're dealing with $_REQUEST even before the form is submitted, you're just outputting the form, what would $_REQUEST contain at that point? ...
    (comp.lang.php)