Loading ...
Sorry, an error occurred while loading the content.

How to get the parent URL from PHP Code

Expand Messages
  • dhana_1706
    Hi, We have designed our all html pages having 3 frames. We have used 3 php/html pages to display in the frames. From one of my php page - We need to get the
    Message 1 of 2 , Nov 29, 2007
    • 0 Attachment
      Hi,

      We have designed our all html pages having 3 frames. We have used 3
      php/html pages to display in the frames.
      From one of my php page - We need to get the main parent's URL. We
      tried using $_SERVER['PHP_SELF'], it gives the url of same page and not
      the parent's url.

      We need a way to get the parent url through php code - similar
      to "Javascript code - window.parent.document.URL".

      We need a solution either
      1. To store the value got thro javascript as a php variable. OR
      2. To get the parent url from the page thro php code.

      Kindly tell me the solution for it

      Thanks,
      Dhana
    • Vijay Srinivas
      Dear Dhana, You can try using $_SESSION. This will remain permanently, until and unless it is unset or the program is closed. Vijay Srinivas ...
      Message 2 of 2 , Dec 13, 2007
      • 0 Attachment
        Dear Dhana,

        You can try using $_SESSION. This will remain
        permanently, until and unless it is unset or the
        program is closed.

        Vijay Srinivas
        --- dhana_1706 <dhana_1706@...> wrote:

        > Hi,
        >
        > We have designed our all html pages having 3 frames.
        > We have used 3
        > php/html pages to display in the frames.
        > From one of my php page - We need to get the main
        > parent's URL. We
        > tried using $_SERVER['PHP_SELF'], it gives the url
        > of same page and not
        > the parent's url.
        >
        > We need a way to get the parent url through php code
        > - similar
        > to "Javascript code - window.parent.document.URL".
        >
        > We need a solution either
        > 1. To store the value got thro javascript as a php
        > variable. OR
        > 2. To get the parent url from the page thro php
        > code.
        >
        > Kindly tell me the solution for it
        >
        > Thanks,
        > Dhana
        >
        >



        ____________________________________________________________________________________
        Be a better friend, newshound, and
        know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
      Your message has been successfully submitted and would be delivered to recipients shortly.