if($bbuserinfo['posts'] >= 5 and $bbuserinfo['usergroupid'] == 2) { $DB_site->query("UPDATE user SET usergroupid=8 WHERE userid=$bbuserinfo[userid]"); }