Passing variables from PHP page 1 to an iframe residing in PHP page2
Can't solve this problem. If the iframe resides in page 1 everything is working fine, but not when the iframe is in page 2.
How to solve this?
The only way to do what you want is to pass the data with a cookie or in $_SESSION variables. You can't directly pass data to a document that resides in an <iframe> in a second document with HTML alone.
Thanks for the answer!
How do I do this in practise? I have never worked with cookies and/or cookies.
You need to include the following code on each page you want to use the session information:
You can set variables on a usual way in the session variable and asking it back as well:
If you need the data to be available even after the visitor has closed his/her browser and then comes back to your webpage you should consider using cookies.
$_SESSION['name-for-your-variable'] = 'here your data';
Thanks a lot for help!
Just working fine now!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread