I'm writing a project in php that will basically give me a webpage with links to things like:
- a page containing my favorite youtube videos stored in a mysql db
- a page with all my favorite games
- and music ect
All will be embeded directly inside the webpage rather than linking to the site.
To simplify this I've made a master template "index.php" and then using $_GET
I pass pages and other info through to the template which is then handled by a page check script which performs a number of ifs to determine what php script to load into the website.
Where my question lies is whats the prefered method for loading theese scripts into the website as my current method is
if ($_GET["page"] == "videos"){
include ("dynapage/scripts/videos/videos.php");
}
if ($_GET["page"] == "music"){
include ("dynapage/scripts/music/music.php");
}
ect
Is using includes to add this code into my template a good thing to do or is there a better method you can suggest?
note: checks for isset
are already included in the checks and aditional pbs are availble on request.