Topic: Header/Footer on non-forum page
I'm trying to make a static, non-forum page that includes the forum header/footer. Here is my code:
<?
define('PUN_ROOT', './');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';
require PUN_ROOT.'header.php';
<CONTENT>
require PUN_ROOT.'footer.php';
?>
This works if the <CONTENT> doesn't include PHP scripting and such. But as soon as I add PHP scripting and mySQL database stuff, I get the following error:
Fatal error: Call to a member function on a non-object in blah/blah/blah/footer.php on line 130
Line 130 of Footer.php is:
$db->end_transaction();
Any ideas? Thanks