$haart_regimen = $_POST['haart_regimen'];
    $haart_change_date = $_POST['haart_change_date'];
    $counselling = $_POST['counselling'];
    $hiv_status_partner = $_POST['hiv_status_partner'];
    $return_date = $_POST['return_date'];
    $btn = $_POST['btn'];
    $anc_followup = array($anc_study_id, $abs_date, $visit_count, $anc_visit_date, $gestational_period, $haart_change, $haart_regimen, $haart_change_date, $counselling, $hiv_status_partner, $return_date);
    if ($btn == "submit") {
        if ($db->insertAncFollowup($anc_followup) > 0) {
            echo '<label class="control-label" for="inputSuccess">Women ANC Followup recorded successfully</label> <br \\> Return to <a href="dashboard.php" >Dashboard</a>';
        } else {
            echo '<label class="control-label" for="inputError">Women ANC Followup was not recorded.</label><br \\>Return to <a href="dashboard.php" >Dashboard</a>';
        }
    } else {
        if ($btn == "update") {
            if ($db->editAncFollowup($anc_followup, $anc_id) > 0) {
                echo '<label class="control-label" for="inputSuccess"> Women ANC Followup  updated successfully</label> <br \\> Return to <a href="dashboard.php" >Dashboard</a>';
            } else {
                echo '<label class="control-label" for="inputError">Women ANC Followup was not updated.</label><br \\>Return to <a href="dashboard.php" >Dashboard</a>';
            }
        }
    }
}
if ($action == "add" || $action == "edit") {
    $select_record = $db->selectRecord($table, $tbl_id, $anc_id);
    ?>
                            <div class="row">
                                
                                <form role="form" action="anc_followup.php?id=<?php 
    echo $anc_id;
    ?>