-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategories.php
More file actions
114 lines (81 loc) · 3.82 KB
/
categories.php
File metadata and controls
114 lines (81 loc) · 3.82 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
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
<?php
require_once('include/header.php');
require_once('include/sidebar.php');
error_reporting(0);
?>
<!-- Main Content -->
<div class="main-content">
<section class="section">
<div class="card col-12 col-md-8 col-lg-8">
<div class="card-header">
<h4>Add Category </h4>
</div>
<form method="post" action="scripts.php" autocomplete="off" enctype="multipart/form-data">
<div class="card-body" >
<div class="form-row">
<div class="form-group col-md-10">
<label for="inputEmail4"> Category Name <spam style="color:red;">*</spam></label>
<input type="text" class="form-control" id="inputText" name="category" placeholder=" Category Name" required maxlength="50">
</div>
</div>
</div>
<div class="card-footer text-center">
<button type="submit" name="AddCategory" value="" class="btn btn-primary">Add</button>
</div>
</div>
</form>
</section>
<section class="section">
<div class="section-body">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h4>Category</h4>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-striped" id="table-1">
<thead>
<tr>
<th class="text-center">
#
</th>
<th class="align-middle">Category </th>
<th class="align-middle"> Action</th>
</tr>
</thead>
<tbody>
<?php
$result = $conn->query("SELECT * FROM category WHERE status = 1");
if($result->num_rows>0){
$no = 1;
while ($row = $result->fetch_assoc()) {
echo '<tr>
<td class="text-center">
'.$no.'
</td>
<td>
'.$row['category'].'
</td>
<td>
<a href="scripts.php?DlCategory=true&s='.$row['id'].'" class="badge badge-shadow" data-toggle="tooltip" data-placement="left"
title="Please Careful Do not ask for conformation (Delete Category) "><span class="text-danger font-weight-bold">X </span></a>
</td>
</tr>';
$no++;
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<?php
require_once('include/footer.php');
?>