$viral_load = $_POST['viral_load']; } $viral_date = $_POST['viral_date']; $who_stage = $_POST['who_stage']; $btn = $_POST['btn']; $next_visit = $_POST['next_visit_date']; $adherence = array($a_study_id, $visit, $haart_change, $haart_change_date, $haart_regimen, $art_effect, $self_art_adherence, $self_ctx_adherence, $cd4_taken, $cd4_count, $cd4_date, $vl_taken, $viral_load, $viral_date, $who_stage, $next_visit); if ($btn == "submit") { if ($db->insertAdherence($adherence) > 0) { echo '<label class="control-label" for="inputSuccess">Women Adherence recorded successfully</label> <br \\> Return to <a href="dashboard.php" >Dashboard</a>'; } else { echo '<label class="control-label" for="inputError">Women Adherence was not recorded.</label><br \\>Return to <a href="dashboard.php" >Dashboard</a>'; } } else { if ($btn == "update") { if ($db->editAdherence($adherence, $adherence_id) > 0) { echo '<label class="control-label" for="inputSuccess">Women Adherence updated successfully</label> <br \\> Return to <a href="dashboard.php" >Dashboard</a>'; } else { echo '<label class="control-label" for="inputError">Women Adherence 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, $adherence_id); ?> <div class="row"> <form role="form" action="adherence.php?id=<?php echo $adherence_id; ?> " method="post">