Jump to content

[SOLVED] PHP Include Layout


PrimatesForever

Recommended Posts

Hey folks, ive looked all over but i cant seem to find any answers to my problem.

 

Im building a PHP website and im using PHP include. Im trying to set it up so i only have to edit index.php when i need to edit the layout. So im stuck. Im not sure how to get 15 pages of different conent to show up on one page. I do know i have to use links like this. index.php?id=news

 

 

I need to do this with PHP including the layout. Not frames or anything else.

http://69.89.20.60/~primates/RoC/index.php if you want to look at the site. im ready to go postal. I've lost 2 days working on this and i dont have 2 days to waste. So any help would be greatly greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/49247-solved-php-include-layout/
Share on other sites

if ($_GET['page'] == "home")
{
include("home.html");// includes the content for the homepage
}
if ($_GET['page'] == "band")
{
include("band.html");// includes the content for the band info page
}

example url: index.php?page=band

 

So do i put index.php in place of home? and band.php in place of band?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.