Simple content management system
I'd rewrite the first part like this:

if(empty($_GET['key']) or !strcmp($_GET['key'], 'home')){
    $page = 'section';
    $id = 1; // integer not string
}elseif(!strcmp($_GET['key'], 'blahblah')){
    $page = 'blahblah';
    $id = 2; // integer not string
} // ...
include ('header.php');
include ("{$page}.php");
include ('footer.php');



Switch for strings is not always the best idea. You might want case insensitive compare and that's the strcasecmp realm.
If $_GET['key'] is missing, you will get a notice with the switch while empty() is safe.
$id seems to be an integer 1 so why make it a string '1'?
Why concatenate like this $page.'.php' when you can have php do it for you "{$page}.php"?


As of the second part, things are not too great:


Why concatenate on echo like this echo 'string'.'string' when echo is a language construct and allows this echo 'string', 'string' which skips the concatenation?
Why use $num_results == 0 when you can just use !$num_results?
Why not escape arguments in MySQL Query (let's just say you have an $id integer and might get away with it here) when SQL injections are so nasty :)


PS: AND YOU need to work on your formatting A LOT... like very much!