-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tambah.php
70 lines (61 loc) · 2.01 KB
/
tambah.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
<?php
require 'functions.php';
if( isset($_POST["submit"]) ) {
if( tambah($_POST) > 0 ) {
echo "
<script>
alert('Success update databased');
document.location.href ='stok.php';
</script>
";
} else {
echo "
<script>
alert('Failed Update databased');
document.location.href ='stok.php';
</script>
";
}
}
?>
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>Add New Product</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href='https://www.hockeycomputindo.com/favicon.ico' rel='icon' type='image/x-icon'/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
</head>
<body>
<div class="container">
<?php require 'head.php';?>
<?php require 'nav.php';?>
<div class="row shadow rounded">
<div class="col-12 col-md-4"></div>
<div class="col-12 col-md-4 p-3 p-md-5">
<form action="" method="post">
<label for="id">Name </label>
<input type="text" name="nama" class="rounded float-right" id="nama" required><br/>
<label for="id">Barcode </label>
<input type="text" name="barcode" class="rounded float-right" id="barcode" required><br/>
<label for="id">Buy Price </label>
<input type="text" name="beli" class="rounded float-right" id="beli"><br/>
<label for="id">Sell Price </label>
<input type="text" name="jual" class="rounded float-right" id="jual" required><br/>
<label for="id">stok </label>
<input type="text" name="stok" class="rounded float-right" id="stok"><br/>
<br/>
<button class="btn btn-dark btn-block btn-lg" type="submit" name="submit">
Save
</button>
</form>
<div class="col-12 col-md-4"></div>
<div class="col-12 col-md-12 text-center">
<hr>
<p class="text-center"><small>present by <a href="https://mesinkasironline.web.app" class="text-dark"> https://mesinkasironline.web.app</a></small></p>
</div>
</div>
</div>
</div>
</body>
</html>