-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditForm.php
More file actions
46 lines (43 loc) · 1.38 KB
/
editForm.php
File metadata and controls
46 lines (43 loc) · 1.38 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Edit</title>
</head>
<body>
<?php
include "koneksi.php";
$id = $_GET['id'];
$query = "select * from product where id='$id'";
$result = mysqli_query($connect, $query);
?>
<form enctype="multipart/form-data" action="prosesEdit.php" method="POST">
<table>
<?php
while ($a = mysqli_fetch_array($result)) { ?>
<tr>
<td>Id: </td>
<td><input type="number" name="id" value="<?php echo $a['id']; ?>" readonly></td>
</tr>
<tr>
<td>Nama Product: </td>
<td><input type="text" name="nama" value="<?php echo $a['product_nama']; ?>" required></td>
</tr>
<tr>
<td>Harga: </td>
<td><input type="number" name="harga" value="<?php echo $a['harga']; ?>" required></td>
</tr>
<tr>
<td>Foto Barang: </td>
<td><input type="file" name="poto" required></td>
</tr>
<tr><td>Foto harus upload ulang</td></tr>
<tr>
<td><input type="submit" name="simpan" value="Simpan"></td>
</tr>
<?php
}
?>
</table>
</form>
</body>
</html>