demon_athens Posted January 1, 2007 Share Posted January 1, 2007 Hi there! and Happy new year to all the communityI have a php page with an iframe. Problem is that when I click from the menu the iframe doesn't GET the variable in order to dynamically change its content. I think that the solution maybe something like pointing that $_GET['variable'] is a value from parent window but I really don't know how to do it.Example: I have a link that loads content.php?id=1. The content.php has an iframe that reads data from category 1 ( mysql table). I can't parse the $_GET['id'] into iframe.Any freak that could help? Link to comment https://forums.phpfreaks.com/topic/32445-solved-iframe-get-variable-from-parent-windowmain/ Share on other sites More sharing options...
onlyican Posted January 1, 2007 Share Posted January 1, 2007 The 3 main ways of parsing dataPOSTGETSESSIONS If you dont want a form, then post is out of the questionIf you cant get the data from the address bar, then the GET is out of the questionTry using SESSION Link to comment https://forums.phpfreaks.com/topic/32445-solved-iframe-get-variable-from-parent-windowmain/#findComment-150760 Share on other sites More sharing options...
demon_athens Posted January 2, 2007 Author Share Posted January 2, 2007 I generally use Get variables in such situations. Session is a solution but probably the one that can cause problems if the end user is behind an aggresive firewall. Searching the web I found some information about using javascript but I can get it work.Post is out of the question.I can set the Get variable and the page that has the iframe can read it. The iframe cannot. cause its a different webpage...so any other suggestions?thanks for your help onlyican. Link to comment https://forums.phpfreaks.com/topic/32445-solved-iframe-get-variable-from-parent-windowmain/#findComment-151316 Share on other sites More sharing options...
taith Posted January 2, 2007 Share Posted January 2, 2007 the iframe can read $_GET but a little differently...[code]<iframe src="iframe.php?op=blah"></iframe> #$_GET[op] will be transfered to the iframe, not the parent window.[/code] Link to comment https://forums.phpfreaks.com/topic/32445-solved-iframe-get-variable-from-parent-windowmain/#findComment-151334 Share on other sites More sharing options...
demon_athens Posted January 2, 2007 Author Share Posted January 2, 2007 yes... you are right.. I found out it by myself little later than the previous post and started to hit my head on the wall. So silly sometimes that I was shamed to share the solution...thank you all. :-) Link to comment https://forums.phpfreaks.com/topic/32445-solved-iframe-get-variable-from-parent-windowmain/#findComment-151366 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.