-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathupdate.php
59 lines (54 loc) · 2.21 KB
/
update.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
<?php
require 'includes/header.php';
if (isset($_GET['id'])) {
$data = getById($_GET['id']);
}
if (isset($_POST['update'])) {
var_dump($_POST);
$update = update($_POST);
if ($update == 1) {
return header('Location: index.php');
}
}
?>
<div class="container my-4">
<div class="row">
<div class="col col-4 mx-auto">
<div class="card shadow">
<div class="card-header">
<h4 class="text-center">Tambah hasil tambang</h4>
</div>
<div class="card-body">
<form action="" method="post">
<input type="hidden" name="mine_id" value="<?= $data['mine_id'] ?>">
<div class="form-group">
<label for="">Hasil tambang</label>
<input type="text" name="mine_result" class="form-control" value="<?= $data['mine_result'] ?>">
</div>
<div class="form-group">
<label for="">warna</label>
<input type="text" name="mine_color" class="form-control" value="<?= $data['mine_color'] ?>">
</div>
<div class="form-group">
<label for="">tanggal</label>
<input type="text" name="install_date" class="form-control " value="<?= $data['install_date'] ?>">
</div>
<div class="form-group">
<label for="">pemilik</label>
<input type="text" name="mine_owner" class="form-control" value="<?= $data['mine_owner'] ?>">
</div>
</div>
<div class="card-footer">
<div class="d-flex justify-content-around">
<a href="index.php" class="btn btn-danger btn-sm">Batal</a>
<button type="submit" name="update" class="btn btn-primary btn-sm">Update</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
require 'includes/footer.php';
?>