-
Notifications
You must be signed in to change notification settings - Fork 0
/
add-new-product-modal.php
55 lines (50 loc) · 3.31 KB
/
add-new-product-modal.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
<?php include_once'getProductsType.php';?>
<div id="myModal" class="modal fade" role="dialog" style="width: 100% !important;">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title text-center" style="color: black">Product</h4>
</div>
<form class="form" id="add-product-form" role="form" action="" method="POST" enctype="multipart/form-data">
<!-- Modal Body-->
<div class="modal-body">
<div class="">
<label class="">Product Name</label>
<input type="text" class="form-control" name="name" placeholder="Product Name" required>
<label class="">Product Type</label>
<select class="form-control" name="productType">
<?php
// var_dump($type);
foreach($type as $temp){
$id=$temp['typeID'];
$name=$temp['typeName'];
echo "<option value='$id'>$name</option>";
}
?>
</select>
<label class="">Product Price</label>
<input type="text" class="form-control" name="productPrice" placeholder="Product Price" required>
<label class="">City</label>
<input type="text" class="form-control" name="city" placeholder="City" required>
<label class="">Description</label>
<input type="text" class="form-control" name="description" placeholder=" Brief Description" required>
<fieldset>
<legend>Upload Images Of Product</legend>
<input type="file" style="display: inline-block" accept="image/*" name="img[]" id="input_img1"><img src="uploads/NoImage.png" id="img1" height="40px">
<input type="file" style="display: inline-block" accept="image/*" name="img[]" id="input_img2"><img src="uploads/NoImage.png" id="img2" height="40px">
<input type="file" style="display: inline-block" accept="image/*" name="img[]" id="input_img3"><img src="uploads/NoImage.png" id="img3" height="40px">
<input type="file" style="display: inline-block" accept="image/*" name="img[]" id="input_img4"><img src="uploads/NoImage.png" id="img4" height="40px">
</fieldset>
<!-- <input type="hidden" name="userName" value="--><?php //echo $_SESSION['user'];?><!--">-->
<input type="hidden" name="userID" value="<?php echo $_SESSION['userID'];?>">
</div>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-primary" name="add" value="Submit">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</form>
</div>
</div>