prepare("DELETE FROM testimonials WHERE id = ?"); $stmt->execute([$id]); $success = 'Testimonial deleted successfully!'; } catch (PDOException $e) { $error = 'Failed to delete testimonial: ' . $e->getMessage(); } } else { $error = 'Invalid testimonial ID.'; } } // Fetch testimonials try { $stmt = $pdo->query("SELECT * FROM testimonials ORDER BY created_at DESC"); $testimonials = $stmt->fetchAll(); } catch (PDOException $e) { die("Database lookup error: " . $e->getMessage()); } include '../includes/admin_header.php'; ?>
| ID | Client Name | Designation | Rating | Comment | Date Created | Actions |
|---|---|---|---|---|---|---|
| # |
|
|
||||
No testimonials foundAdd customer testimonials to display on the homepage slider. Add First Testimonial |
||||||