Dynamic iframe values from form variables
Posted: Mon Dec 07, 2009 9:59 pm
Okay, I'm not sure if this is doable, but I'd like to ask you guys here.
I want to provide visitors a way to search for and make Google Trends searches on my site (without having to go to http://google.com.trends/). My idea is that if I made a PHP form on http://mydomain.com/page1.php where there are textboxes to enter keywords into, the values for those textboxes can be retrieved as $variables, which then can be somehow forwarded to http://mydomain.com/page2.php where a Google Trends gadget lives, and the code can be modified on-the-fly with the passed variables from the form:
I'm not sure if this makes any sense to you.. So can this be done? Thanks heaps!
I want to provide visitors a way to search for and make Google Trends searches on my site (without having to go to http://google.com.trends/). My idea is that if I made a PHP form on http://mydomain.com/page1.php where there are textboxes to enter keywords into, the values for those textboxes can be retrieved as $variables, which then can be somehow forwarded to http://mydomain.com/page2.php where a Google Trends gadget lives, and the code can be modified on-the-fly with the passed variables from the form:
Code: Select all
<iframe src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/trends_gadget.xml&source=imag&up_is_init=true&up_cur_term=$textbox1,+$textbox2,+$textbox3,+$textbox4&up_date=mtd&up_region=US" style="border:1px solid #ccc; padding:10px;" width="330" height="250" frameborder="0" scrolling="no"></iframe>