Exemple #1
0
use config as cfg;
$db = new cfg\database();
$ht = new cls\hospitals();
// print "<pre>" . print_r($ht->get(), 1) . "</pre>";
// exit;
$hospital_option = "";
$selected = "";
foreach ($ht->get() as $k => $v) {
    if (isset($_GET['hospital'])) {
        $selected = $v['hospital_id'] == $_GET['hospital'] ? "selected" : "";
    }
    $hospital_option .= "<option value='" . $v['hospital_id'] . "' " . $selected . ">" . $v['hospital_name'] . "</option>";
}
$typeofmedical_option = "";
$selected = "";
foreach ($ht->get_typeofmedical() as $k => $v) {
    if (isset($_GET['typeofmedical'])) {
        $selected = $v['medical_type_id'] == $_GET['typeofmedical'] ? "selected" : "";
    }
    $typeofmedical_option .= "<option value='" . $v['medical_type_id'] . "' " . $selected . ">" . $v['medical_name'] . "</option>";
}
?>
    <!DOCTYPE html>
    <html lang="en">

    <head>
        <meta charset="UTF-8">
        <title>ประเมินการรักษา</title>
        <link rel="stylesheet" href="js/jquery-ui-1.11.4.custom/jquery-ui.min.css">
        <link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
        <link rel="stylesheet" href="css/font-awesome.min.css">