-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewSizes.php
More file actions
70 lines (61 loc) · 2.07 KB
/
viewSizes.php
File metadata and controls
70 lines (61 loc) · 2.07 KB
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
<div >
<h3>Available Sizes</h3>
<table class="table ">
<thead>
<tr>
<th class="text-center">S.N.</th>
<th class="text-center">Size</th>
<th class="text-center" colspan="2">Action</th>
</tr>
</thead>
<?php
include_once "./dbconnect.php";
$sql="SELECT * from sizes";
$result=$conn-> query($sql);
$count=1;
if ($result-> num_rows > 0){
while ($row=$result-> fetch_assoc()) {
?>
<tr>
<td><?=$count?></td>
<td><?=$row["size_name"]?></td>
<!-- <td><button class="btn btn-primary" >Edit</button></td> -->
<td><button class="btn btn-danger" style="height:40px" onclick="sizeDelete('<?=$row['size_id']?>')">Delete</button></td>
</tr>
<?php
$count=$count+1;
}
}
?>
</table>
<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-secondary" style="height:40px" data-toggle="modal" data-target="#myModal">
Add Size
</button>
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">New Size Record</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<form enctype='multipart/form-data' action="./addSizeController.php" method="POST">
<div class="form-group">
<label for="size">Size Number:</label>
<input type="text" class="form-control" name="size" required>
</div>
<div class="form-group">
<button type="submit" class="btn btn-secondary" name="upload" style="height:40px">Add Size</button>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" style="height:40px">Close</button>
</div>
</div>
</div>
</div>
</div>