How to call external page and how to place into specific location ?

Discussion in 'HTML & Website Design' started by premecorp, Feb 1, 2012.

  1. #1
    Hello Friends,
    I have designed a page, it has header, footer, menus, left panel, right panel and body. Here I kept all in separate file and included with PHP include() function. And I need when I click any menu (I used hyperlink) the specific page should be open in the main body location. So my problem is how to call specific page by specific menu and how to place in main body page at specific location. In this case my main body page, menu page and external page all are different page. If anyone have good idea about this kindly help me.

    Thanks & Regards,
    Premashish
     
    premecorp, Feb 1, 2012 IP
  2. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #2
    I'm not really sure I understand the question.. but...
    Make a separate file for all your webpages, e.g home.php, contact.php, about.php.
    Then add your content to each page.
    Then use includes on each of those pages to include your header, footer etc.

    So each page would look something like:
    <? include 'header.php'; ?>
    <? include 'sidebar.php'; ?>
    <h1>Home page</h1>
    This is my content, blablabla
    <? include 'footer.php'; ?>
    PHP:
    That way you can easily add additional meta info (titles, description etc), into each page.
     
    Kerosene, Feb 2, 2012 IP