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
<?php
session_start();
include_once('config/koneksi.php');
open_page('update');
$database = new mysqli('localhost', 'root', '', 'tb silalahi');
$query = "SELECT * FROM koleksi ";
$result_set = $database->query($query);
while ($query = $result_set->fetch_assoc()){
?>
<form action="update_process.php" method="post">
<table border="1">
<tr>
<td>id</td>
<td>:</td>
<td><input type="text" value="<?php echo $query['id']?>" name="id"></td>
</tr>
<tr>
<td>Nama</td>
<td>:</td>
<td><input type="text" value="<?php echo $query['nama']?>" name="nama"></td>
</tr>
<tr>
<td>Description</td>
<td>:</td>
<td><input type="text"value="<?php echo $query['desc']?>" name="description"></td>
</tr>
<tr>
<td>Image</td>
<td>:</td>
<td><input type="file" name="image" <?php echo $query['image']?>" name="title"></td>
</tr>
<tr><td colspan="3"><input type="submit" name="action"
value="update"></td></tr>
</table>
</form>
<?php
}
close_page();
?>