Well for one, this:
}}}}}}}}}}}}}}}}}}
tells me the first thing you should do is find some coding style guidelines/standards and study them. Properly indenting code and aligning braces makes it much, much easier to read.
Otherwise,whathappenedifwesimplytypedallofourrepliesinthesameformthatyougiveyourcodetous? Itwouldprobablyberatherfurstrating,wouldn'tit?
Second, all of your if() statements are comparing the variable $page with [man]constant[/man]s. Since I'm betting you didn't [man]define/man all those constants, you probably wanted it to compare those values as [man]string[/man]s. As such, you should be surrounding those values with quotes. When I copied your code snippet, I received a message about a parse error on line 80, not 66 - corresponding with the if() statement for Log Homes. (The parse error comes about because PHP sees what it thinks is a logical expression, $page == Log, with a constant, Homes, immediately following it with no operator in between the two - something that doesn't make any sense.)
Finally, note that using an [man]array[/man] could provide you with a much more elegant (and easily updated/modified) solution. Something like:
$pages = array(
// --- Category 1 ---
'foo' => 'path/to/foo.html',
'bar' => 'path/to/bar.html',
// --- Category 2 ---
'foobar' => 'other/path/to/foobar.baz'
);
if( ( isset( $_GET[ 'page' ] ) )
&& ( isset( $pages[ $_GET[ 'page' ] ] ) ) )
{
include( $pages[ $_GET[ 'page' ] ] );
}
else
{
include( "path/to/default.html" );
}
Even if you didn't go the array approach, there's no reason to create such a heavily-nested logic structure as you do now. Instead, it probably should have been a single-level stream of if/elseif/elseif/elseif/.../else's.