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? Link to comment https://forums.phpfreaks.com/topic/146647-solved-_get-problem-2/ 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']; ?>" Link to comment https://forums.phpfreaks.com/topic/146647-solved-_get-problem-2/#findComment-769949 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 Link to comment https://forums.phpfreaks.com/topic/146647-solved-_get-problem-2/#findComment-770011 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! Link to comment https://forums.phpfreaks.com/topic/146647-solved-_get-problem-2/#findComment-770023 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.