DEVILofDARKNESS Posted February 24, 2009 Share Posted February 24, 2009 Hi, I have made a page that uses an I-frame. the main page is /gedichten/test/testgedicht.php?poem_id=1 for example the I-frame is in /functieknoppen/functieknoppengedicht.php I try to get the poem_id from the main page his url to use it in that I-frame (with $_GET), is that possible? Quote Link to comment Share on other sites More sharing options...
MadTechie Posted February 24, 2009 Share Posted February 24, 2009 simple solution would be echo it to the frame ie <iframe src="/functieknoppen/functieknoppengedicht.php?poem_id=<php echo $_GET['poem_id']; ?>" Quote Link to comment Share on other sites More sharing options...
DEVILofDARKNESS Posted February 24, 2009 Author Share Posted February 24, 2009 I can get the ?poem_id from the main URL, to that from the iframe? how is that possible, if the iframe never has been in contact with the ?poem_id Quote Link to comment Share on other sites More sharing options...
MadTechie Posted February 24, 2009 Share Posted February 24, 2009 Okay.. 1) Main page is load with ?poem_id=123. 2) the Main page contains an Iframe.. So. instead of having <iframe src="/functieknoppen/functieknoppengedicht.php"> to load up your iframe you do this <iframe src="/functieknoppen/functieknoppengedicht.php?poem_id=<php echo $_GET['poem_id']; ?>" thus passing poem_id from the main page to the iframe.. So in view source it will appear as <iframe src="/functieknoppen/functieknoppengedicht.php?poem_id=123" Now when functieknoppengedicht.php loads up it will be able to use $_GET['poem_id'].. Another option is always sessions! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.