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
How to call external page and how to place into specific loc
Moderator: General Moderators
Re: How to call external page and how to place into specific
you will need to pass a variable to each page which dictates which body page to include
eg: http://www.domain.com?page=home
then in the script you can use a switch or if statement to include the page you want.
You should also consider using mod_rewrite to improve the search engine friendliness of the urls.
eg: http://www.domain.com?page=home
then in the script you can use a switch or if statement to include the page you want.
Code: Select all
if($_GET['page'] == "home")
{
include "home.php";
}