$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") { $first_sample_collection = $_POST['first_sample_collection']; $first_results_collected = $_POST['first_results_collected']; $first_results = $_POST['first_results']; $diagnosis = array($first_sample_collection, $first_results_collected, $first_results, $_SESSION["username"]); if ($db->updateInfantHivTests($diagnosis, $Diag_id, "first", $mode)) { echo '<label class="control-label" for="inputSuccess">Early Infant Diagnosis updated successfully!</label>'; echo '<br \\>';