PrimatesForever Posted April 30, 2007 Share Posted April 30, 2007 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 More sharing options...
papaface Posted April 30, 2007 Share Posted April 30, 2007 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 Link to comment https://forums.phpfreaks.com/topic/49247-solved-php-include-layout/#findComment-241301 Share on other sites More sharing options...
PrimatesForever Posted April 30, 2007 Author Share Posted April 30, 2007 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? Link to comment https://forums.phpfreaks.com/topic/49247-solved-php-include-layout/#findComment-241302 Share on other sites More sharing options...
PrimatesForever Posted April 30, 2007 Author Share Posted April 30, 2007 I figured it out! YEEESS! *dances a jig* Thank you for your help! Link to comment https://forums.phpfreaks.com/topic/49247-solved-php-include-layout/#findComment-241327 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.