コード例 #1
0
    } else {
        $hemoglobin = $_POST['hemoglobin'];
    }
    $hemoglobin_date = $_POST['hemoglobin_date'];
    $tb_status = $_POST['tb_status'];
    $preg_status = $_POST['preg_status'];
    $edd = $_POST['edd'];
    $fp_status = $_POST['fp_status'];
    //$fp_method = $_POST['fp_method'];
    $disclosure = $_POST['disclosure'];
    $patner_tested = $_POST['patner_tested'];
    $next_visit = $_POST['next_visit_date'];
    $btn = $_POST['btn'];
    $variables = array($v_study_id, $visit, $weight, $height, $hb_taken, $hemoglobin, $hemoglobin_date, $tb_status, $preg_status, $edd, $fp_status, $fp_method, $disclosure, $patner_tested, $next_visit);
    if ($btn == "submit") {
        if ($db->insertVariables($variables) > 0) {
            echo '<label class="control-label" for="inputSuccess">Women Variables recorded successfully</label> <br \\> Return to <a href="dashboard.php" >Dashboard</a>';
        } else {
            echo '<label class="control-label" for="inputError">Women Variables was not recorded.</label><br \\>Return to <a href="dashboard.php" >Dashboard</a>';
        }
    } else {
        if ($btn == "update") {
            if ($db->editVariables($variables, $variables_id) > 0) {
                echo '<label class="control-label" for="inputSuccess">Women Variables updated successfully</label> <br \\> Return to <a href="dashboard.php" >Dashboard</a>';
            } else {
                echo '<label class="control-label" for="inputError">Women Variables was not updated.</label><br \\>Return to <a href="dashboard.php" >Dashboard</a>';
            }
        }
    }
}
if ($action == "add" || $action == "edit") {