D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home3
/
encodto1
/
public_html
/
encoadminders
/
Filename :
getquote.php
back
Copy
<?php require('config.php') ?> <!DOCTYPE html> <html lang="en"> <head> <?php include('style.php') ?> <title>Get Quotes</title> <style> /* General Reset */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Poppins', sans-serif; background-color: #f9f9f9; color: #333; } /* Container */ .container { max-width: 1200px; margin: 0 auto; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } .container h2 { font-size: 24px; color: #2c3e50; margin-bottom: 20px; text-align: center; } /* Table Styling */ .table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 16px; overflow-x: auto; } .table thead { background-color: #34495e; color: #fff; text-align: left; } .table thead th { padding: 12px 15px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; } .table tbody tr { border-bottom: 1px solid #ddd; transition: background-color 0.2s ease; } .table tbody tr:hover { background-color: #f1f1f1; } .table tbody td { padding: 12px 15px; font-size: 14px; vertical-align: middle; } .table tbody td:last-child { text-align: right; } /* No Data Found */ .table tbody td[colspan] { text-align: center; font-style: italic; color: #888; } /* Responsive Table */ @media (max-width: 768px) { .table thead { display: none; } .table tbody tr { display: flex; flex-direction: column; border: 1px solid #ddd; margin-bottom: 10px; border-radius: 8px; overflow: hidden; } .table tbody td { display: flex; justify-content: space-between; padding: 10px; font-size: 14px; } .table tbody td::before { content: attr(data-label); font-weight: 600; color: #34495e; } .table tbody td:last-child { text-align: left; } } </style> </head> <body> <?php include('sidebar.php') ?> <div class="home-section"> <div class="container"> <h2>All Get Quotes</h2> <table class="table"> <thead> <tr> <th>First Name</th> <th>Last Name</th> <th>Email</th> <th>Phone</th> <th>Country</th> <th>Budget</th> <th>Message</th> <th>Date</th> </tr> </thead> <tbody> <?php // Fetching all data from the getquote table $query = "SELECT * FROM getquote ORDER BY created_at DESC"; $result = $conn->query($query); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { // Truncate message for table display $message = strip_tags($row['message']); $short_message = strlen($message) > 50 ? substr($message, 0, 50) . '...' : $message; echo "<tr> <td>" . htmlspecialchars($row['first_name']) . "</td> <td>" . htmlspecialchars($row['last_name']) . "</td> <td>" . htmlspecialchars($row['email']) . "</td> <td>" . htmlspecialchars($row['phone_number']) . "</td> <td>" . htmlspecialchars($row['country']) . "</td> <td>" . htmlspecialchars($row['budget']) . "</td> <td>" . htmlspecialchars($short_message) . "</td> <td>" . htmlspecialchars($row['created_at']) . "</td> </tr>"; } } else { echo "<tr><td colspan='8'>No quotes found</td></tr>"; } ?> </tbody> </table> </div> </div> <?php include('footer.php') ?> </body> </html>