$marital_status = $_POST['marital_status'];
    $hiv_status = $_POST['hiv_status'];
    $initial_hiv_status = $_POST['initial_hiv_status'];
    $hiv_retest = $_POST['hiv_retest'];
    $woman_haart = $_POST['woman_haart'];
    $haart_regimen = $_POST['haart_regimen'];
    $haart_start_date = $_POST['haart_start_date'];
    $counselling = $_POST['counselling'];
    $hiv_status_partner = $_POST['hiv_status_partner'];
    $participant_outcome = $_POST['participant_outcome'];
    $outdate = $_POST['outdate'];
    $return_date = $_POST['return_date'];
    $btn = $_POST['btn'];
    $demographics = array($study_id, $abs_date, $facility_id, $anc_id, $psc_id, $visit_count, $anc_visit_date, $birth_date, $residence, $parity, $gravida, $gestational_period, $lmp, $edd, $marital_status, $hiv_status, $initial_hiv_status, $hiv_retest, $woman_haart, $haart_regimen, $haart_start_date, $counselling, $hiv_status_partner, $participant_outcome, $outdate, $return_date);
    if ($btn == "submit") {
        if ($db->insertDemographics($demographics) > 0) {
            echo '<label class="control-label" for="inputSuccess">Women Identifiers and Demographics recorded successfully</label> <br \\> Return to <a href="dashboard.php" >Dashboard</a>';
        } else {
            echo '<label class="control-label" for="inputError">Women Identifiers and Demographics was not recorded.</label><br \\>Return to <a href="dashboard.php" >Dashboard</a>';
        }
    } else {
        if ($btn == "update") {
            if ($db->editDemographics($demographics, $demographic_id) > 0) {
                echo '<label class="control-label" for="inputSuccess"> Women Identifiers and Demographics updated successfully</label> <br \\> Return to <a href="dashboard.php" >Dashboard</a>';
            } else {
                echo '<label class="control-label" for="inputError">Women Identifiers and Demographics was not updated.</label><br \\>Return to <a href="dashboard.php" >Dashboard</a>';
            }
        }
    }
}
if ($action == "add" || $action == "edit") {