require('./global.php'); $userstuff = $DB_site->query_first("SELECT storep FROM user WHERE userid=$bbuserinfo[userid]"); $points=$userstuff[storep]; if ($points < 1000 && $forumid == 51){ echo $points; } rest of file