-
Notifications
You must be signed in to change notification settings - Fork 0
/
editdatadokter.php
96 lines (90 loc) · 4.16 KB
/
editdatadokter.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
<?php
$koneksi = mysqli_connect("localhost", "root", "123", "banin");
if (!$koneksi){
echo "koneksi gagal";
}
// require 'update.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css"></script>
<link rel="stylesheet" href="css/styles.css">
<title>Edit Data Dokter</title>
</head>
<body>
<section id="section1">
<div class="container">
<div id="selector_1" class="row">
<div id="selector1" class="col-lg-12">
<div class="wrapper-flex-spacebetween">
<div class="wrapper-flex-center">
<div class="tulisan1-judul">
BenMed
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="section2">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="wrapper-flex-center-down">
<h1>Edit Data Dokter</h1>
<br>
<br>
<?php
if (isset($_GET["id"])) {
$id = $_GET["id"];
}
$data = mysqli_query($koneksi, "SELECT * FROM doctor WHERE id = '$id' ");
while($d = mysqli_fetch_assoc($data)){
?>
<form action="update.php" method="POST">
<ul>
<li style="display: flex; justify-content: space-between;">
<label for="nama">Nama</label>
<input type="hidden" name="id" id="id" autocomplete="off" value="<?php echo $d["id"]?>">
<input type="text" name="nama" id="nama" autocomplete="off" value="<?php echo $d["nama"]?>">
</li>
<br>
<li style="display: flex; justify-content: space-between;">
<label for="alamat">Alamat</label>
<input type="text" name="alamat" id="alamat" autocomplete="off" value="<?php echo $d["alamat"]?>">
</li>
<br>
<li style="display: flex; justify-content: space-between;">
<label for="spesialis">Spesialis</label>
<input type="text" name="spesialis" id="spesialis" autocomplete="off" value="<?php echo $d["spesialis"]?>">
</li>
<br>
<li style="display: flex; justify-content: space-between;">
<label for="free">Free</label>
<input type="text" name="free" id="free" autocomplete="off" value="<?php echo $d["free"]?>">
</li>
<br>
<br>
<li>
<button type="submit" name="editdatadokter">Edit</button>
</li>
</ul>
</form>
<?php
}
?>
</div>
</div>
</div>
</div>
</section>
</body>
</html>