All you have to do is to do something like this with the link : %26lt;a href=%26quot;index.php?view=subindex%26quot;'%26gt; The name of lthe link enters here%26lt;/a%26gt;
The nest step is to use the php GET method to receiove it. Try this :
if(isset($_GET['view']))
{
$view = $_GET['view'];
if($view=='subindex')
{
echo %26quot;This is the subindex page%26quot;;
}
}
Do the same thing for all the links, just change the name of the view...for example view = contactus.
Good lucknot quite sure what you're wanting
1. index.php does not technically have to handle all of the pages
2. I believe you are looking for $_GET['view'] (in your example it would return 'subindex.php')
3. If you want index.php to handle all the pages then yes do 'include file.php'
Example index.php
%26lt;?php
//was a specific page requested?
if(isset($_GET['view'])){
$page = $_GET['view'];
}
else{
//default page
$page = 'homepage';
}
include_once $page;
?%26gt;
Edit: Definitely do not do it afamguy's way... having all the files in one massive php file is a bad approach, not only will it making editing harder, but php must interpret that entire file each time its accesseduse div tags to set changes in url next to index page and also get more study about html and css scripting..