recovering parameters passed with URL on the receiving PHP end

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

    recovering parameters passed with URL on the receiving PHP end

    If I pass parameters to a PHP script in URL like

    ..php?a=aa&b=bb
    how do I recover them on the receiving PHP end?
    I looked at the list of PHP Variables using phpinfo() and found nothing
    suitable


  • Geoff Berrow

    #2
    Re: recovering parameters passed with URL on the receiving PHP end

    I noticed that Message-ID:
    <415e81a3$0$179 67$ed2619ec@ptn-nntp-reader02.plus.n et> from aa contained
    the following:
    [color=blue]
    >If I pass parameters to a PHP script in URL like
    >
    >.php?a=aa&b= bb
    >how do I recover them on the receiving PHP end?
    >I looked at the list of PHP Variables using phpinfo() and found nothing
    >suitable[/color]

    aa will be in the superglobal variable $_GET['a']

    bb will be in the superglobal variable $_GET['b']
    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    • Janwillem Borleffs

      #3
      Re: recovering parameters passed with URL on the receiving PHP end

      Geoff Berrow wrote:[color=blue]
      > aa will be in the superglobal variable $_GET['a']
      >
      > bb will be in the superglobal variable $_GET['b'][/color]

      And the entire query string will be in:

      $_SERVER['QUERY_STRING']


      JW



      Comment

      • Bent Stigsen

        #4
        Re: recovering parameters passed with URL on the receiving PHP end

        aa wrote:[color=blue]
        > If I pass parameters to a PHP script in URL like
        >
        > .php?a=aa&b=bb
        > how do I recover them on the receiving PHP end?
        > I looked at the list of PHP Variables using phpinfo() and found nothing
        > suitable[/color]

        Request parameters will only show in output if parameters are present
        when you use phpinfo. If you did, then look again. They *are* there.

        /Bent

        Comment

        Working...