Refferring page and current page?

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

    Refferring page and current page?

    Hi all...again,

    I can't find a var that contains the referring page (I've looked on PHP.net and in several
    books)...there is one in ASP, so I am assuming there is one in PHP, too. And, I would like to test
    for the current page so that I can modify my menu and footer depending on the currently loaded
    page...is there a var that reveals this?

    Thanks,

    Miki
  • Paul 'piz' Wellner Bou

    #2
    Re: Refferring page and current page?

    Michelle wrote:[color=blue]
    > I can't find a var that contains the referring page (I've looked on
    > PHP.net and in several books)...there is one in ASP, so I am assuming
    > there is one in PHP, too. And, I would like to test for the current
    > page so that I can modify my menu and footer depending on the currently
    > loaded page...is there a var that reveals this?[/color]

    I think you're searching for superglobals like those:

    References all variables available in global scope


    And, more explicitely:



    And, even more:

    $_SERVER['HTTP_REFERER']

    Saludo
    Paul.

    Comment

    • Pedro Graca

      #3
      Re: Refferring page and current page?

      Michelle wrote:[color=blue]
      > I can't find a var that contains the referring page (I've looked on PHP.net and in several
      > books)...there is one in ASP, so I am assuming there is one in PHP, too. And, I would like to test
      > for the current page so that I can modify my menu and footer depending on the currently loaded
      > page...is there a var that reveals this?[/color]

      <?php
      echo $_SERVER['HTTP_REFERER'];
      ?>

      but this fakeable -- same as for ASP :)


      read the docs


      The other reserved variables are described @

      --
      --= my mail box only accepts =--
      --= Content-Type: text/plain =--
      --= Size below 10001 bytes =--

      Comment

      • Michelle

        #4
        Re: Refferring page and current page?

        Pedro Graca wrote:
        [color=blue]
        > Michelle wrote:
        >[color=green]
        >>I can't find a var that contains the referring page (I've looked on PHP.net and in several
        >>books)...ther e is one in ASP, so I am assuming there is one in PHP, too. And, I would like to test
        >>for the current page so that I can modify my menu and footer depending on the currently loaded
        >>page...is there a var that reveals this?[/color]
        >
        >
        > <?php
        > echo $_SERVER['HTTP_REFERER'];
        > ?>
        >
        > but this fakeable -- same as for ASP :)
        >
        >
        > read the docs
        > http://www.php.net/manual/en/reserve...riables.server
        >
        > The other reserved variables are described @
        > http://www.php.net/manual/en/languag...s.superglobals[/color]

        Thanks guys...as usually you have been most helpful!

        Miki

        Comment

        Working...