$witness1 = PersonManager::getSinglePerson('id', PersonManager::getLastID());
    }
    $marriage->setIdWitness1($witness1->getId());
}
//Process The Witness1
if ($_POST["nameWitness2"] !== '') {
    $witness2 = PersonManager::getSinglePerson('names', $_POST["nameWitness2"], 'lastname1', $_POST["lastname1Witness2"], 'lastname2', $_POST["lastname2Witness2"]);
    if ($witness2 === NULL) {
        $witness2 = new Person();
        $witness2->setNames($_POST["nameWitness2"]);
        $witness2->setLastname1($_POST["lastname1Witness2"]);
        $witness2->setLastname2($_POST["lastname2Witness2"]);
        PersonManager::addPerson($witness2, 'true');
        $witness2 = PersonManager::getSinglePerson('id', PersonManager::getLastID());
    }
    $marriage->setIdWitness2($witness2->getId());
}
//Get The Book Registry Data
$reverse = substr($_POST["reverseBookRegistry"], 0, 1);
if ($reverse === 'Y' || $reverse === 'S') {
    $reverse = 'Y';
}
$bookRegistry = MarriageManager::getSingleMarriageRegistry('book', $_POST["bookBookRegistry"], 'page', $_POST["pageBookRegistry"], 'number', $_POST["numBookRegistry"], 'reverse', $reverse);
if ($bookRegistry === NULL) {
    $bookRegistry = new MarriageRegistry();
    $bookRegistry->setBook($_POST["bookBookRegistry"]);
    $bookRegistry->setPage($_POST["pageBookRegistry"]);
    $bookRegistry->setNumber($_POST["numBookRegistry"]);
    $bookRegistry->setReverse($reverse);
    MarriageManager::addMarriageRegistry($bookRegistry);
    $bookRegistry = MarriageManager::getSingleMarriageRegistry('book', $_POST["bookBookRegistry"], 'page', $_POST["pageBookRegistry"], 'number', $_POST["numBookRegistry"], 'reverse', substr($reverse, 0, 1));