if ($memberID != null) {
        $inputMemberID = $_POST[MemberEditConstants::MEMBER_ID_INPUT];
        $encryptedID = $_POST[MemberEditConstants::ENCRYPTED_ID_INPUT];
        if (MemberController::processMemberSecurityCheck($memberID, $inputMemberID, $encryptedID)) {
            AdvertisementController::deactivateMemberAdvertisements($memberID, $dbConnection);
            $bandSearchResults = BandSearchController::searchBandsByMemberID($memberID, 1, 100, $dbConnection);
            if ($bandSearchResults != null) {
                $bandSkeletons = $bandSearchResults->getVariable(SearchResults::SKELETONS);
                if ($bandSkeletons != null) {
                    foreach ($bandSkeletons as $bandSkeleton) {
                        $bandID = $bandSkeleton->getVariable(Band::BAND_ID);
                        $bandMembers = BandMemberDao::selectBandMembers($bandID, $dbConnection);
                        if (count($bandMembers) == 1) {
                            BandController::deactivateBand($memberID, $bandID, $dbConnection);
                        }
                    }
                }
            }
            MemberController::deactivateMusicianProfile($memberID, $dbConnection);
            $processed = true;
        }
    }
} catch (Exception $ex) {
    $processed = false;
}
$dbConnection = null;
if (!$processed) {
    ErrorUtilities::errorRedirect(ErrorConstants::GENERAL_ERROR);
} else {
    header("Location: " . $config->getVariable(Config::WEB_ROOT_PATH));
}