View Full Version : Help: Need to open search results in iframe on new page.

May 19th, 2010, 02:11 AM
Hello everyone,

I searched around a bit and found posts where people were wanting to have the results of a search box show up in an iframe on another page or have a page open in an iframe when a link on another page is clicked. The problem is that im kinda new to all this and I was having a hard time putting all that information together and changing it to fit my needs.

What I need to do is have a user type in a keyword select a site from a select list and then after hitting submit, they are taken to a new php page called results for example. On this new page is an iframe that will load the results of the search.

The form on page a is posting to a php script called search.php that takes what the user entered and the site selected and fetches the results of that keywords from the selected site and loads it into a frame on the same page.

If I can get these results to open in a frame on a new page I will be able to have a more streamlined design on this results page which is what im shooting for.

Please feel free to take a look at the site at thetorrentninja . com and if anyone had a block of code for page a and page b and a bit of info about the logic that would be helpful.

If there is a better way to do this that would be cool too.

May 19th, 2010, 04:56 PM
This is not a PHP question. IFrames are targeted on the client side, so this would be an HTML question. PHP can only process and serve the data provided, it cannot retarget locations.
Moving from PHP to HTML/CSS.