$arv_pro_other = $_POST['arv_pro_other']; $enrol_date = $_POST['enrol_date']; $enrol_age = $_POST['enrol_age']; $participant_outcome = $_POST['participant_outcome']; $outdate = $_POST['outdate']; $btn = $_POST['btn']; $registration = array($hei_id, $d_study_id, $birth_date, $birth_weight, $sex, $delivery_place, $arv_prophylaxis, $arv_pro_other, $enrol_date, $enrol_age, $participant_outcome, $outdate); if ($btn == "submit") { if ($db->insertInfantRegistration($registration) > 0) { echo '<label class="control-label" for="inputSuccess">Early Infant Registration recorded successfully</label> <br \\> Return to <a href="dashboard.php" >Dashboard</a>'; } else { echo '<label class="control-label" for="inputError">Early Infant Registration was not recorded.</label><br \\>Return to <a href="dashboard.php" >Dashboard</a>'; } } else { if ($btn == "update") { if ($db->editInfantRegistration($registration, $reg_id) > 0) { echo '<label class="control-label" for="inputSuccess"> Early Infant Registration updated successfully</label> <br \\> Return to <a href="dashboard.php" >Dashboard</a>'; } else { echo '<label class="control-label" for="inputError"> Early Infant Registration was not updated.</label><br \\>Return to <a href="dashboard.php" >Dashboard</a>'; } } } } ?> <?php if ($action == "add" || $action == "edit") { $select_record = $db->selectRecord($table, $tbl_id, $id); ?> <div class="panel-heading"> Enter forms details <button type="button" onclick="window.location.href='infant_registration.php?id=<?php echo $reg_id;