Okay, try this.
Make sure at the very top of the PHP file it says this:
PHP Code:
<?php
error_reporting(7);
include('./global.php');
Then try this query:
PHP Code:
$memhealth=$DB_site->query_first("SELECT battle_health FROM user WHERE userid='$bbuserinfo[userid]'");
$battle_health=$memhealth[battle_health];
And just put $battle_health anywhere in a template that is called from that PHP file. See if that helps.