Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2006
    Posts
    216
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Retaining variable values when the page reloads

    I have two iframes within a webpage. The second iframe posts a variable to the first when a hyperlink is clicked.

    The first iframe retrieves the value after refreshing, then creates a php object using the data sent from iframe 2 and outputs the value.

    The user can then click on another hyperlink in the second iframe and pass another value to the first iframe in the same way. A second object is created and both values are read out.

    HOWEVER, the first value doesnt appear, im guessing as the object was destroyed on the second refresh. How can I retain the values even after a refresh?????

  • #2
    Senior Coder
    Join Date
    Jan 2007
    Posts
    1,648
    Thanks
    1
    Thanked 58 Times in 54 Posts
    To achieve this you will have to use sessions.

    Read this page for more information:

    http://us2.php.net/manual/en/ref.session.php


  •  

    Posting Permissions

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