-
Notifications
You must be signed in to change notification settings - Fork 0
/
master_stok.php
71 lines (69 loc) · 1.57 KB
/
master_stok.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
<?php
include_once 'dbconfig.php';
$me = $_SERVER['PHP_SELF'];
if(isset($_POST['btn-save'])){
$id = $_POST['id'];
$nama = $_POST['nama'];
$HPP = $_POST['HPP'];
$HET = $_POST['HET'];
if($lib->newItem($id, $nama, $HPP, $HET)){
header("Location: master_stok.php?success");
}
else{
header("Location: master_stok.php?failure");
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>JENIS BARANG</title>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" >
<link href="bootstrap/css/main.css" rel="stylesheet" >
</head>
<body>
<?php
if(isset($_GET['success'])){
?>
<div class="container">
<div class="alert alert-info">
<strong>CUSTOMER BERHASIL DITAMBAHKAN</strong>
</div>
</div>
<?php
}
else if(isset($_GET['failure'])){
?>
<div class="container">
<div class="alert alert-warning">
<strong>ERROR! RECORD GAGAL DISIMPAN!</strong>
</div>
</div>
<?php
}
?>
<div class="clearfix"></div><br>
<h1>JENIS BARANG</h1>
<form method="post">
<table class='table table-bordered'>
<tr>
<td>ID</td>
<td><input type="text" name="id" class='form-control' required></td>
</tr>
<tr>
<td>NAMA BARANG</td>
<td><input type="text" name="nama" class="form-control" required="true"></td>
</tr>
<tr>
<td>HPP</td>
<td><input type="number" name="HPP" class="form-control" required="true"></td>
</tr>
<tr>
<td>HET</td>
<td><input type="number" name="HET" class="form-control" required="true"></td>
</tr>
</table>
<button class="btn-primary btn" type="submit" name="btn-save">ADD</button>
</form>
</body>
</html>