-
Notifications
You must be signed in to change notification settings - Fork 7
/
form_edit.php
executable file
·83 lines (79 loc) · 2.41 KB
/
form_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
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
<!DOCTYPE html>
<html>
<head>
<title>Edit Kendaraan | Web Pendataan</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link href='https://yukcoding.blogspot.com/favicon.ico' rel='icon' type='image/x-icon'/>
</head>
<body>
<div class="judul">
<h2>Web Pendataan Kehilangan Kendaraan Bermotor Roda 2</h2>
<h3>Polrestabes Semarang</h3>
</div>
<br />
<a href="index.php">
<button>< Lihat Semua Data</button>
</a>
<h3>Edit Kendaraan</h3>
<form action="proses_edit.php" method="post">
<?php
include "+koneksi.php";
$id = $_GET['id'];
$query = mysqli_query($con, "SELECT * FROM kendaraan WHERE id = '$id'") or die(mysqli_error($con));
$data = mysqli_fetch_array($query);
?>
<table>
<tr>
<td>Jenis Kendaraan</td>
<td>
<input type="hidden" name="id" value="<?php echo $data['id'] ?>">
<input type="text" name="jenis" value="<?php echo $data['jenis'] ?>" required>
</td>
</tr>
<tr>
<td>Merk/Type</td>
<td><input type="text" name="merk" value="<?php echo $data['merk'] ?>" required></td>
</tr>
<tr>
<td>Warna Kendaraan</td>
<td><input type="text" name="warna" value="<?php echo $data['warna'] ?>" required></td>
</tr>
<tr>
<td>Tahun Pembuatan</td>
<td><input type="number" name="tahun" value="<?php echo $data['tahun'] ?>" required></td>
</tr>
<tr>
<td>Bahan Bakar</td>
<td><input type="text" name="bbm" value="<?php echo $data['bbm'] ?>" required></td>
</tr>
<tr>
<td>Nomor Polisi</td>
<td><input type="text" name="nopol" value="<?php echo $data['nopol'] ?>" required></td>
</tr>
<tr>
<td>Nomor Rangka</td>
<td><input type="text" name="norangka" value="<?php echo $data['norangka'] ?>" required></td>
</tr>
<tr>
<td>Nomor Mesin</td>
<td><input type="text" name="nomesin" value="<?php echo $data['nomesin'] ?>" required></td>
</tr>
<tr>
<td>Pemilik</td>
<td><input type="text" name="pemilik" value="<?php echo $data['pemilik'] ?>" required></td>
</tr>
<tr>
<td>Alamat Pemilik</td>
<td><textarea name="alamat" required><?php echo $data['alamat'] ?></textarea></td>
</tr>
<td></td>
<td><button type="submit">Simpan</button></td>
</tr>
</table>
</form>
</body>
</html>
<!--
Code by YukCoding Tutor
www.yukcoding.id
-->