Results 1 to 2 of 2

Thread: Passing data from one page to another

  1. #1
    Join Date
    Aug 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Passing data from one page to another

    Hello all,

    I need to find a way to pass information from one page to another:

    1) The user is logged into a session, but I can not pass the data to the session.

    2) The information is derived from a MySQL query and not related to my session info (info = one item)

    3) I would like to relate the information to a variable so I can run another query

    4) The second page is a popup, so I'm using javascript to initialise the new page.

    Any suggestions?

    SysX

  2. #2
    Join Date
    Dec 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default use GET

    you do the following:

    in your javascript Popup-er:

    function OpenPopup()
    {
    open( "whatever.php?var_name=value_you_want_to_pass" );
    }

    in your popup page(in this case it's whatever.php):

    <?php
    $passed_value = $_GET['var_name'];

    echo "received value: ".$passed_value;
    ?>



    hope it works for you
    Last edited by nightdriver09; 12-13-2005 at 12:50 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •