// update battles $winid = $DB_site->query_first("SELECT username FROM ".TABLE_PREFIX."user WHERE userid='$_POST['winner'] '"); if ($winid['username'] > 0) { $DB_site->query("UPDATE ".TABLE_PREFIX."user SET wins=wins+1 WHERE username='$winid[username]'"); } // end of battle update