D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
u193541357
/
domains
/
racysanitaryware.com
/
public_html
/
1
/
dev
/
admin
/
Filename :
all-inquiries.php
back
Copy
<?php include('header.php'); ?> <div class="container-fluid"> <div class="d-sm-flex align-items-center justify-content-between mb-4"> <h1 class="h3 mb-2 text-gray-800">Contact Form Inquiries</h1> </div> <div class="card shadow mb-4"> <div class="card-body"> <div class="table-responsive"> <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> <thead> <tr> <th>Sr. No</th> <th>Name</th> <th>Email</th> <th>Phone</th> <th>Message</th> <th>Submitted At</th> </tr> </thead> <tfoot> <tr> <th>Sr. No</th> <th>Name</th> <th>Email</th> <th>Phone</th> <th>Message</th> <th>Submitted At</th> </tr> </tfoot> <tbody> <?php $sql = "SELECT id, name, email, phone, message, created_at FROM contacts ORDER BY created_at DESC"; $result = $conn->query($sql); if ($result->num_rows > 0) { $sr_no = 1; while ($row = $result->fetch_assoc()) { echo "<tr>"; echo "<td>" . $sr_no++ . "</td>"; echo "<td>" . htmlspecialchars($row['name']) . "</td>"; echo "<td>" . htmlspecialchars($row['email']) . "</td>"; echo "<td>" . htmlspecialchars($row['phone']) . "</td>"; echo "<td>" . htmlspecialchars($row['message']) . "</td>"; echo "<td>" . date('Y-m-d H:i:s', strtotime($row['created_at'])) . "</td>"; echo "</tr>"; } } else { echo "<tr><td colspan='6' style='text-align:center;'>No inquiries found Yet.</td></tr>"; } $conn->close(); ?> </tbody> </table> </div> </div> </div> </div> <?php include('footer.php'); ?>