Jump to content

Recommended Posts

Hi, its been about 2 years since i last visited here. i went off php for a while but now have a site to code...

 

i have frame.php with basic template. in the middle where i want the site content.

 

i need links from menu like frame.php?section=members , frame.php?section=register etc. and depending on whats on the section=... it will include that page in the frame..

 

(its been so long!  :'( )

Link to comment
https://forums.phpfreaks.com/topic/85682-coming-back-to-php-need-simple-help/
Share on other sites

Something like this maybe

<?php

switch($_GET['section']) {
    case 'register':
        $page = 'register.php';
        break;
    case 'login':
        $page = 'login.php';
        break;
    default:
        $page = 'main.php';
}
?>
<iframe src="<?=$page;?>"></iframe>

Remember that you can use TARGET= in HTML anchor tags to dictate what frame a link loads in.

 

which is only valid in a frameset and or transitional doc type if you care about those :)

Well, IFRAME isn't supported in strict either. So, he should be using one of those anyway.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.