if($battleopt[givewinexp] == 1 && $battleopt[expperwin] > 0) { if($battle[winnerid] > 0) $DB_site->query("UPDATE user SET xp=xp+($opponentlevel*$battleopt[expperwin] WHERE userid='$battle[winnerid]'"); }