-
Notifications
You must be signed in to change notification settings - Fork 0
/
productadd.php
82 lines (67 loc) · 2.73 KB
/
productadd.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
72
73
74
75
76
77
78
79
80
81
82
<?php
session_start();
include 'function/dbconnect.php';
include 'template/header.php';
include 'template/footer.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<link rel="icon" href="image/favicon.ico" type="image/x-icon">
<title>Add Product | Sanapati Food Store</title>
</head>
<body>
<?php
generateHeader('store');
?>
<div class="container p-5 my-5">
<div class="row">
<?php
if (!isset($_GET['msg'])) {
echo '<p class="text-success text-center">Add product by fill form below</p>';
} else {
if ($_GET['msg'] == 'success') {
echo '<p class="text-success text-center">Product successfully added!</p>';
} else {
echo '<p class="text-danger text-center">' . $_GET['msg'] . '</p>';
}
}
?>
<div class="col-lg-4 col-md-6">
<form class="" method="post" action="function/addproduct.php" enctype="multipart/form-data">
<input name="imgupload" id="imgupload" class="form-control form-control" type="file"
accept="image/jpeg,image/png">
<label class="text-center mb-3" style="font-size:13px;">Make sure to upload jpeg/png image with 1:1
ratio</label>
</div>
<div class="col-lg-8 col-md-6">
<input name="name" class="form-control mb-2" placeholder="Name" type="text" required>
<textarea name="description" class="form-control my-2" placeholder="Description" required></textarea>
<input name="price" class="form-control my-2" placeholder="Price" type="number" required>
<input name="qty" class="form-control mt-2 mb-4" placeholder="Qty" type="number" required>
<button type="submit" class="btn btn-primary btn-block">Add product</button>
<a href="store.php" class="btn btn-dark">Return to Store</a>
</form>
</div>
</div>
</div>
<!-- End of Jumbotron -->
<!-- Footer -->
<?php
generateFooter();
?>
<!-- End of Footer -->
<!-- Script -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3"
crossorigin="anonymous"></script>
<!-- End of Script -->
</body>
</html>