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

Re: Header/Footer on non-forum page

Nevermind, solved.  Sorry for the post, a mod may delete this.

I've been working on this for hours.  Turns out that I was using the same variable name ($db) as punbb, causing a conflict.

3

Re: Header/Footer on non-forum page

I would love it if PunBB would rename it's $db object to something like $pbb_db to avoid possible conflicts.