}
if (isset($_POST['firstName']) || isset($_POST['lastName'])) {
    $nameError = $regMod->InputName($_POST['firstName'] . " " . $_POST['lastName']);
}
if (isset($_POST['username'])) {
    $usernameError = $regMod->InputUsername($_POST['username']);
}
if (isset($_POST['password']) || isset($_POST['passwordAgain'])) {
    $passwordError = $regMod->InputPassword($_POST['password'], $_POST['passwordAgain']);
}
if (isset($_POST['email'])) {
    $emailError = $regMod->InputEmail($_POST['email'], $_POST['email']);
}
if (isset($_POST['captcha_code'])) {
    if ($securimage->check($_POST['captcha_code']) == true) {
        if ($regMod->RequestConfirmation()) {
            //ConfirmUser is the function that will use the confirm code later. Once the confirm code is ready, a variable will be added to be given to the function for use
            $regMod->ConfirmUser();
            echo '<meta http-equiv="REFRESH" content="0;url=registrationSuccess.php"></HEAD>';
            //TODO redirect to registration sucessful page
        }
    } else {
        $catpchaError = "The code did not match. Try Again";
    }
}
function checkIsset($str)
{
    if (isset($str)) {
        echo $str;
    } else {
        return "";