-
Notifications
You must be signed in to change notification settings - Fork 0
/
tambahSolusi.php
103 lines (93 loc) · 3.96 KB
/
tambahSolusi.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
include "function.php";
if (isset($_SESSION['role'])) {
if ($_SESSION['role'] == 1) {
header("location: test.php");
}
} else {
header("location:index.php");
}
$queryPenyakit = mysqli_query($koneksi, "SELECT * FROM penyakit");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="icon/icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dashboard Admin</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous" />
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="kiri">
<section class="logo">
<h3>AyamSehat.</h3>
</section>
<div class="sidebar-heading">
<h5 class="font-weight-bold text-white text-uppercase teks">Data User</h5>
</div>
<section class="isi">
<a class="nav-link" href="indexAdmin.php">
<span>Data Pasien</span></a>
</section>
<div class="sidebar-heading">
<h5 class="font-weight-bold text-white text-uppercase teks">Gejala & Penyakit</h5>
</div>
<section class="isi">
<a class="nav-link" href="indexPenyakit.php">
<span>Data Penyakit</span>
</a>
</section>
<section class="isi">
<a class="nav-link" href="indexGejala.php">
<span>Data Gejala</span>
</a>
</section>
<div class="sidebar-heading">
<h5 class="font-weight-bold text-white text-uppercase teks">Solusi</h5>
</div>
<section class="isi">
<a class="nav-link" href="indexSolusi.php">
<span>Data Solusi</span>
</a>
</section>
<section class="isi">
<a class="nav-link" href="logout.php">
<span>Logout</span>
</a>
</section>
</div>
<div class="kanan">
<div class="container-fluid d-flex align-items-center justify-content-center" style="height: 70vh;">
<div class="card w-50">
<div class="card-header bg-primary text-white">
<h1 class="h3 mb-0">Form Tambah Solusi</h1>
</div>
<div class="card-body">
<form action="function.php?act=tambahSolusi" id="tambah" method="POST">
<div class="form-group">
<label for="deskripsiSolusi">Deskripsi </label>
<textarea class="form-control" id="deskripsiSolusi" name="deskripsiSolusi" rows="3" placeholder="Masukkan Deskripsi Solusi"></textarea>
</div>
<div class="form-group">
<label for="namaSolusi">Solusi</label>
<input type="text" class="form-control" id="namaSolusi" name="namaSolusi" placeholder="Masukkan Solusi">
</div>
<div class="form-group">
<label for="id_penyakit">Nama Penyakit</label>
<select name="id_penyakit" id="id_penyakit" class="form-control">
<option value="">Pilih Penyakit dari Solusi</option>
<?php while ($penyakit = mysqli_fetch_assoc($queryPenyakit)) { ?>
<option value="<?= $penyakit["id_penyakit"]; ?>"><?= $penyakit["penyakit"]; ?></option>
<?php } ?>
</select>
</div>
<input type="submit" name="tambah_btn" id="tambah" class="btn btn-primary btn-block" value="Tambah">
</form>
</div>
</div>
</div>
</div>
</body>
</html>