query("UPDATE contact_messages SET is_read=1 WHERE id=" . intval($_GET['read'])); $conn->query("UPDATE notifications SET is_read=1 WHERE link LIKE '%messages%'"); } $messages = $conn->query("SELECT * FROM contact_messages ORDER BY created_at DESC")->fetch_all(MYSQLI_ASSOC); ?>
| ID | Name | Phone | Subject | Date | Read | Action | |
|---|---|---|---|---|---|---|---|
| = $m['id'] ?> | = htmlspecialchars($m['name']) ?> | = $m['email'] ?> | = $m['phone'] ?: '-' ?> | = htmlspecialchars($m['subject'] ?: '-') ?> | = date('d M Y h:i A', strtotime($m['created_at'])) ?> | = $m['is_read']?'Read':'New' ?> |