As I see it, you can still do all this in your header:
<?php
include(...your config/connect file...);
mysql_query(... get page variables ...);
$pageTitle = stripslashes($titlefromDB);
?>
<html><head><title><?php echo $pageTitle; ?></head>
So you end header.php. Now include this on every page you want to use, and follow yours <body></body></html>.
Only one idea, but in any case you will get around this, first you need to connect to your database, check if the page exists if it is set as a variable, and then start constructing html.
Bryan source
share