-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate.php
117 lines (79 loc) · 4.51 KB
/
create.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?php include("inc/option.php") ?>
<?php include("inc/header.php") ?>
<div class="container">
<a href="index.php" class="btn btn-light mb-3"><< Go Back</a>
<?php if (isset($_GET['status']) && $_GET['status'] == "created") : ?>
<div class="alert alert-success" role="alert">
<strong>Created</strong>
</div>
<?php endif ?>
<?php if (isset($_GET['status']) && $_GET['status'] == "fail_create") : ?>
<div class="alert alert-danger" role="alert">
<strong>Fail Create</strong>
</div>
<?php endif ?>
<!-- Create Form -->
<div class="card border-danger">
<div class="card-header bg-danger text-white">
<strong> Add New Product</strong>
</div>
<div class="card-body">
<form action="add.php" method="post">
<div class="form-row">
<div class="form-group col-md-4">
<input type="text" class="form-control" id="name" name="name" placeholder="Name" required>
</div>
<div class="form-group col-md-4">
<input type="number" class="form-control" id="price" name="price" placeholder="Price" required>
</div>
</div>
<!-- ------------------------------------------------------------------ -->
<div class="input-group mb-4">
<select onchange="fetch_select(this.value);" class="custom-select" name="inputGroupSelect01" id="inputGroupSelect01" required>
<option selected>Choose Product</option>
<option value="Please, provide DVD Memory Size in MB format. Example: 120MB">DVD-disc</option>
<option value="Please, provide Book weight in KG format. Example: 5 KG">Book</option>
<option value="Please, provide furniture dimensions in HxWxL format. Example: 120x100x70 CM">Furniture</option>
</select>
<div class="bg-danger text-white rounded border col-md-7 ml-3">
<div id="print-ajax" class="text-center font-weight-bolder"> Please, choose product! </div>
</div>
</div>
<!-- ------------------------------------------------------------------ -->
<div class="form-row">
<div class="form-group col-md-4">
<input type="text" class="form-control" name="size" id="size" placeholder="size (MB)">
</div>
<div class="form-group col-md-4">
<input type="text" class="form-control" name="weight" id="weight" placeholder="Weight (kg)">
</div>
<div class="form-column col-md-4">
<div class="form-group col-md-12">
<input type="text" class="form-control" name="height" id="height" placeholder="height (cm)">
</div>
<div class="form-group col-md-12">
<input type="text" class="form-control" name="width" id="width" placeholder="width (cm)">
</div>
<div class="form-group col-md-12">
<input type="text" class="form-control" name="length" id="length" placeholder="length (cm)">
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<input type="text" class="form-control" name="image" id="image" placeholder="Image URL">
</div>
<div class="bg-secondary col-md-3">
<div class="text-center text-light"> Recommended Image size (PX): 500x300 </div>
</div>
</div>
<div class="row">
</div>
<button type="submit" class="btn btn-success"> Save</button>
</form>
</div>
</div>
<!-- End create form -->
<br>
</div> <!-- END container -->
<?php include("inc/footer.php") ?>