-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit.php
54 lines (42 loc) · 1.52 KB
/
edit.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
<?php
include "connect.php";
$id = $_GET['id'];
$data = mysqli_query($db, "SELECT * FROM mahasiswa WHERE id_mahasiswa='$id'");
while ($d = mysqli_fetch_array($data)) {
?>
<!DOCTYPE html>
<html>
<head>
<title>Belajar PHP | Edit Data</title>
</head>
<body>
<header>
<h3>Edit Identitas</h3>
</header>
<form action="proses_edit.php" method="POST">
<fieldset>
<input type="hidden" name="id_mahasiswa" value="<?php echo $d['id_mahasiswa']; ?>" />
<p>
<label for="nama">nama: </label>
<input type="text" name="nama" placeholder="nama lengkap" value="<?php echo $d['nama']; ?>" />
</p>
<p>
<label for="alamat">alamat: </label>
<textarea name="alamat"><?php echo $d['alamat'] ?></textarea>
</p>
<p>
<label for="telp">telp: </label>
<textarea name="telp"><?php echo $d['telp'] ?></textarea>
</p>
<p>
<label for="prodi">prodi: </label>
<input type="text" name="prodi" placeholder="prodi" value="<?php echo $d['prodi'] ?>" />
</p>
<p>
<input type="submit" value="Simpan" name="simpan" />
</p>
</fieldset>
</form>
</body>
<?php } ?>
</html>