Including a file based on clicked link

BruceW4yne

New Member
I am beginning to develop a website as a personal project, to discover a little bit web technologies. My question is more about "how to make the things clean" than a technical question.Here is the thing:Let's say that an index.php page will include an other menu.php, which will permit to navigate the website.My index.php look like this, basically:\[code\]include("header");include("menu");include("DEPENDING ON WHICH LINK AS BEEN CLICKED FROM THE MENU");include("bottom");\[/code\]To avoid the POST method, and have a lot of stuff on my URL, I would like to do it an other way, but I do not know what is the best one.I thought about declaring a variable like $page, when a link is clicked, I can do something like "if $page == home", then I include the home.php page... etc...I do not know if my question is clear... I know that it will appear as a very easy and beginner question but I don't even know where to look...Do you know if I can find any "open source website" so I can study the code and see the best practices about it?P.S.: Sorry for my english which is probably not perfect at all, I am working on it.
 
Back
Top