D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home3
/
encodto1
/
slg.encodersunlimited.com
/
slgadmintoys
/
Filename :
testimonials.php
back
Copy
<?php include 'config.php'; if (isset($_GET['id'])) { $id = $_GET['id']; $query = "DELETE FROM slgtoys_testimonial WHERE id = $id"; if (mysqli_query($conn, $query)) { header("Location: testimonials.php"); exit(); } else { echo "Error deleting record: " . mysqli_error($conn); } } ?> <!DOCTYPE html> <html lang="en" data-theme="light"> <head> <?php include 'style.php'; ?> </head> <body> <?php include 'sidebar.php'; ?> <main class="dashboard-main"> <?php include 'header.php'; ?> <div class="dashboard-main-body"> <div class="card"> <div class="card-header"> <h5 class="card-title mb-0">Testimonials</h5> </div> <div class="card-body"> <div class="table-responsive"> <table class="table bordered-table mb-0"> <thead> <tr> <th>Image</th> <th>Name</th> <th>Designation</th> <th>Comment</th> <th>Action</th> </tr> </thead> <tbody> <?php $query = "SELECT * FROM slgtoys_testimonial ORDER BY created_at DESC"; $result = mysqli_query($conn, $query); while ($row = mysqli_fetch_assoc($result)) : ?> <tr> <td><img src="<?= $row['image']; ?>" alt="" class="radius-8" width="50"></td> <td><?= $row['name']; ?></td> <td><?= $row['designation']; ?></td> <td><?= $row['comment']; ?></td> <td> <a href="delete_testimonial.php?id=<?= $row['id']; ?>" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')">Delete</a> </td> </tr> <?php endwhile; ?> </tbody> </table> </div> </div> </div> </div> <?php include 'Footer.php'; ?> </main> </body> </html>