Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2010
    Thanked 0 Times in 0 Posts

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

    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.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 Posts
    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.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts