Array of passed variables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Discenza

    Array of passed variables

    I have a search page within an application I'm developing. The search page
    could have over a dozen variables passed to it, not through a POST or GET,
    just through the URL. Is there something as handy as $HTTP_POST_VARS that
    can be used to cycle through the passed to the page?


    If PHP is compiled with the CLI, the ARGV and ARGC is available, but what
    if it PHP isn't compiled that way?

    --
    Mike Discenza

  • Andy Jeffries

    #2
    Re: Array of passed variables

    On Thu, 31 Jul 2003 14:14:16 +0000, Mike Discenza wrote:[color=blue]
    > I have a search page within an application I'm developing. The search page
    > could have over a dozen variables passed to it, not through a POST or GET,
    > just through the URL. Is there something as handy as $HTTP_POST_VARS that
    > can be used to cycle through the passed to the page?[/color]

    Errr, if the variables are passed via the URL they ARE GET variables. Use
    $_GET.

    Cheers,


    Andy

    Comment

    • Jim Dabell

      #3
      Re: Array of passed variables

      Mike Discenza wrote:
      [color=blue]
      > I have a search page within an application I'm developing. The search
      > page could have over a dozen variables passed to it, not through a POST or
      > GET, just through the URL.[/color]

      If you are talking about URLs of the form
      http://www.example.com/foo?var=val, then that is what is known as GET. Use
      the $_GET superglobal.

      --
      Jim Dabell

      Comment

      Working...