$tb_contact = $_POST['tb_contact'];
    $tb_ass_outcome = $_POST['tb_ass_outcome'];
    $inf_milestones = $_POST['inf_milestones'];
    $feeding_6wks = $_POST['feeding_6wks'];
    $feeding_10wks = $_POST['feeding_10wks'];
    $feeding_14wks = $_POST['feeding_14wks'];
    $feeding_6mths = $_POST['feeding_6mths'];
    $feeding_9mths = $_POST['feeding_9mths'];
    $feeding_12mths = $_POST['feeding_12mths'];
    $feeding_15mths = $_POST['feeding_15mths'];
    $feeding_18mths = $_POST['feeding_18mths'];
    $next_appointment = $_POST['next_appointment'];
    $btn = $_POST['btn'];
    $diagnosis = array($hei_id, $visit_date, $weight, $height, $tb_contact, $tb_ass_outcome, $inf_milestones, $immunization, $feeding_6wks, $feeding_10wks, $feeding_14wks, $feeding_6mths, $feeding_9mths, $feeding_12mths, $feeding_15mths, $feeding_18mths, $next_appointment);
    if ($btn == "submit") {
        if ($db->insertInfantDiagnosis($diagnosis) > 0) {
            echo '<label class="control-label" for="inputSuccess">Early Infant Diagnosis recorded successfully</label> <br \\> Return to <a href="dashboard.php" >Dashboard</a>';
        } else {
            echo '<label class="control-label" for="inputError">Early Infant Diagnosis was not recorded.</label><br \\>Return to <a href="dashboard.php" >Dashboard</a>';
        }
    } else {
        if ($btn == "update") {
            if ($db->editInfantDiagnosis($diagnosis, $Diag_id)) {
                echo '<label class="control-label" for="inputSuccess">Early Infant Diagnosis updated successfully</label> <br \\> Return to <a href="dashboard.php" >Dashboard</a>';
            } else {
                echo '<label class="control-label" for="inputError">Early Infant Diagnosis was not updated.</label><br \\>Return to <a href="dashboard.php" >Dashboard</a>';
            }
        }
    }
} else {
    if ($mode == "DNA_PCR") {