Results 1 to 2 of 2

Thread: PHP Iframe alternative

  1. #1
    Join Date
    Mar 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP Iframe alternative

    Hi I'm Bill. Just joined up. I'm having a brain fart when it comes to PHP and what not. I understand what the include function does. what i dont know is how to implement that in my page. I want to set up a PHP page exactly like an iframe, but without the iframe. say i have 5 links. link1 displays link1content.php in a table. link2 displays link2content.php in that same table removing link1content and so on just like an iframe would.

    im understood that this code pulls a page and displays it exactly where i put it?
    PHP Code:
    <?php
    include "content.html";
    ?>
    and this code interperets the URL?
    PHP Code:
    <?php
    include "pagedirectory/".$_GET["q"].".htm";
    ?>
    (got that info from here)

    any help would be greatly appreciated. thank you

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    I just put the include inside a container with fixed dimensions, like so:
    Code:
    <div id="fakeiframe">
       <?php  include("content.html") ?>
    </div>
    and define the size/ position/ scrolling etc. in the css
    Code:
    #fakeiframe{
       width: 500px;
       height: 150px;
       overflow: scroll;
       ...
       }

Bookmarks

Posting Permissions

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