<a href="target.php?link=value"> no longer works in PHP 4.3.6

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

    <a href="target.php?link=value"> no longer works in PHP 4.3.6

    RH9, Apache 2.0.49, php 4.3.6
    been away from php for about 2 years and
    this way used to work, still does in older php versions, now it doesn't.
    is there a reason for this? a work around?

    Thanx in Advance!!
  • Shane Lahey

    #2
    Re: &lt;a href=&quot;targ et.php?link=val ue&quot;&gt; no longer works in PHP 4.3.6

    On 27 May 2004 22:12:28 -0700, chingayou@yahoo .com (c) wrote:
    [color=blue]
    >RH9, Apache 2.0.49, php 4.3.6
    >been away from php for about 2 years and
    >this way used to work, still does in older php versions, now it doesn't.
    >is there a reason for this? a work around?
    >
    >Thanx in Advance!![/color]
    be more specific, because that should work... :D

    Comment

    • Theo

      #3
      Re: &lt;a href=&quot;targ et.php?link=val ue&quot;&gt; no longer works in PHP 4.3.6

      Shane Lahey <s.lahey@roadru nner.nf.net> wrote in
      news:56mdb0l6d8 81v41mj09jrfj2f 7c2ul08ql@4ax.c om:
      [color=blue]
      > be more specific, because that should work... :D[/color]

      perhaps hes means about getting the variables... before $_GET was around?

      Comment

      • Berislav Lopac

        #4
        Re: &lt;a href=&quot;targ et.php?link=val ue&quot;&gt; no longer works in PHP 4.3.6

        Theo wrote:[color=blue]
        > Shane Lahey <s.lahey@roadru nner.nf.net> wrote in
        > news:56mdb0l6d8 81v41mj09jrfj2f 7c2ul08ql@4ax.c om:
        >[color=green]
        >> be more specific, because that should work... :D[/color]
        >
        > perhaps hes means about getting the variables... before $_GET was
        > around?[/color]

        Actually, he has problems with register_global s.

        Berislav

        --
        If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
        Groucho, Chico, and Harpo, then Usenet is Zeppo.


        Comment

        • ccjx

          #5
          Re: &lt;a href=&quot;targ et.php?link=val ue&quot;&gt; no longer works in PHP 4.3.6

          Berislav Lopac wrote:[color=blue]
          > Theo wrote:
          >[color=green]
          >>Shane Lahey <s.lahey@roadru nner.nf.net> wrote in
          >>news:56mdb0l6 d881v41mj09jrfj 2f7c2ul08ql@4ax .com:
          >>
          >>[color=darkred]
          >>>be more specific, because that should work... :D[/color]
          >>
          >>perhaps hes means about getting the variables... before $_GET was
          >>around?[/color]
          >
          >
          > Actually, he has problems with register_global s.
          >
          > Berislav
          >
          > --
          > If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
          > Groucho, Chico, and Harpo, then Usenet is Zeppo.
          >
          >[/color]
          If you want to use that, in current versions of PHP, it will save the
          arguments into a superglobal known as $_GET.

          In the past, if register_global s was enabled, at this page,
          "something.php? var=hello"
          $var = "hello"

          But this created a huge security risk, for example if your script has a
          $logged_in = 1; //very lousy and bad code, dude,
          The evil user can just use "something.php? logged_in=1" and your site is
          toast.

          So in recent versions of PHP, to access that particular variable, use $_GET.

          e.g. something.php?v ar1=hi&var2=boo
          echo $_GET["var1"]; // hi
          echo $_GET["var2"]; // boo

          Similarly, POST variables are now under $_POST just fyi.

          That's all, hope that helps, have fun!

          ccjx

          Comment

          • c

            #6
            Re: &lt;a href=&quot;targ et.php?link=val ue&quot;&gt; no longer works in PHP 4.3.6

            "Berislav Lopac" <berislav.lopac @dimedia.hr> wrote in message news:<c96qc2$sk c$1@ls219.htnet .hr>...[color=blue]
            > Theo wrote:[color=green]
            > > Shane Lahey <s.lahey@roadru nner.nf.net> wrote in
            > > news:56mdb0l6d8 81v41mj09jrfj2f 7c2ul08ql@4ax.c om:
            > >[color=darkred]
            > >> be more specific, because that should work... :D[/color]
            > >
            > > perhaps hes means about getting the variables... before $_GET was
            > > around?[/color]
            >
            > Actually, he has problems with register_global s.
            >
            > Berislav[/color]

            Yes, it is about getting variables from one page to the next using
            that syntax.
            I have seen $_GET around but do not know how to incorporate that into
            my code using a link. Tried turning on register_global s in php.ini,
            that didn't work either, besides, it is shunned on by programming
            community.
            Thanx!

            Comment

            • Theo

              #7
              Re: &lt;a href=&quot;targ et.php?link=val ue&quot;&gt; no longer works in PHP 4.3.6

              chingayou@yahoo .com (c) wrote in news:57807ce.04 05280759.edf73f 5
              @posting.google .com:
              [color=blue]
              > I have seen $_GET around but do not know how to incorporate that into
              > my code using a link.[/color]

              you dont. you use the link normally 'page.php?var=x ' and use $_GET on the
              receiving page '$var = $_GET['var']' then all is good.

              Comment

              • Shane Lahey

                #8
                Re: &lt;a href=&quot;targ et.php?link=val ue&quot;&gt; no longer works in PHP 4.3.6

                On 28 May 2004 08:59:19 -0700, chingayou@yahoo .com (c) wrote:
                [color=blue]
                >"Berislav Lopac" <berislav.lopac @dimedia.hr> wrote in message news:<c96qc2$sk c$1@ls219.htnet .hr>...[color=green]
                >> Theo wrote:[color=darkred]
                >> > Shane Lahey <s.lahey@roadru nner.nf.net> wrote in
                >> > news:56mdb0l6d8 81v41mj09jrfj2f 7c2ul08ql@4ax.c om:
                >> >
                >> >> be more specific, because that should work... :D
                >> >
                >> > perhaps hes means about getting the variables... before $_GET was
                >> > around?[/color]
                >>
                >> Actually, he has problems with register_global s.
                >>
                >> Berislav[/color]
                >
                >Yes, it is about getting variables from one page to the next using
                >that syntax.
                >I have seen $_GET around but do not know how to incorporate that into
                >my code using a link. Tried turning on register_global s in php.ini,
                >that didn't work either, besides, it is shunned on by programming
                >community.
                >Thanx![/color]

                in target.php the value of link would be stored in the variable:
                $_GET['link']


                Comment

                • Philipp Kern

                  #9
                  Re: &lt;a href=&quot;targ et.php?link=val ue&quot;&gt; no longer works in PHP 4.3.6

                  On 2004-05-28, ccjx <ccjx@newagezon e.com> wrote:[color=blue]
                  > Similarly, POST variables are now under $_POST just fyi.[/color]

                  And all together are shared in $_REQUEST ;)

                  Bye,
                  phil
                  --
                  Please send replies (not followups) to the address set in Reply-To.
                  Philipp Kern - PK2186-RIPE - http://www.philkern.de

                  Comment

                  Working...