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

Thread: Page Layout?

  1. #1
    New Coder
    Join Date
    Jul 2007
    Thanked 0 Times in 0 Posts

    Exclamation Page Layout?

    I making a php website and i was going to use framesets for the layout but then i decided not to so i say that some sites use some sort of layout also like framesets but its not! So i want to make my site index url like index.php?page=news and in the index have it get the $page variable and include news.php there! It does include it but when i interact with the new page i goes to the new.php page and then my menu and banner is not shown!

    Is there anyway to fix this or do php have its own frameset like scripts avaliable?


  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 Posts
    Maybe you mean that you want to 'include' the file news.php when the index.php?page=news is that right?
    Easy to do, assuming that 'news.php' has output to the browser, or can be fetched and dumped into the scope of the index.php script:
    PHP Code:
    if (isset($_GET['page']))
    $file '/path/to/my/files/' $_GET['page'] . '.php';
        if (

    Hmm, something seems a little off about that, someone please confirm for me, I'm having a bad programming day :P
    Is that kinda what you are looking for?
    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 ;)


    Posting Permissions

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