-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathservices.php
47 lines (45 loc) · 1.74 KB
/
services.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
<?php require './components/header.php' ?>
<?php require './backend/Connection.php' ?>
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Service's List</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Service Name</th>
<th>Description</th>
<th>Price</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
$sql = "SELECT * FROM services";
$result = mysqli_query($connection, $sql);
$check = mysqli_num_rows($result);
if($check > 0){
?>
<?php while($row = mysqli_fetch_assoc($result)){ ?>
<tr>
<td><?php echo $row['ServiceName']; ?></td>
<td><?php echo $row['Description']; ?></td>
<td><?php echo $row['Price']; ?></td>
<td>
<a href="/cms/backend/CarService.php?delete-service=<?php echo $row['ServiceID']; ?>" name="delete-vehicle" class="btn btn-danger">Delete</a>
</td>
</tr>
<?php
}
?>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<?php require './components/footer.php' ?>