One way (there'll be many others) is to use variables passed to the page via the URL (as you thought) and then use a switch statement to choose between pages to include:
Suppose (just for example) that you have two pages to view 'home' and 'about us', say. We will use the variable name 'page' in the URL.
Also, suppose the page that you 'land' on after the login process is called main.php.
The links to the pages would be
www.xxx.com/xxx/main.php?page=home
and
www.xxx.com/main.php?page=about
Then, on main.php, you could have the following switch:
echo html_header();
switch($_GET['page']){
case 'home':
echo home_page();
break;
case 'about':
echo about_page();
break;
default:
die("Cannot recognise parameter");
break;
}
echo html_footer();
The two 'html' functions can deliver 'same-for-all-pages' HTML.
The two 'page' functions can deliver page-specific HTML.
TO DO:
1) Have a look on the online manual for $_GET and the 'switch' statement.
2) Add error checking to make sure parameter is valid ... I've just put a simple 'die' statement.
That should get you on the road.