query('SELECT id, name, email, company, project_type, budget, message, status, created_at FROM contact_requests ORDER BY created_at DESC, id DESC LIMIT 100')->fetchAll(); $totals = $pdo->query("SELECT COUNT(*) AS total_count, SUM(status = 'new') AS new_count, SUM(DATE(created_at) = CURDATE()) AS today_count FROM contact_requests")->fetch(); $totalCount = (int) ($totals['total_count'] ?? 0); $newCount = (int) ($totals['new_count'] ?? 0); $todayCount = (int) ($totals['today_count'] ?? 0); if ($selectedId !== null) { $stmt = $pdo->prepare('SELECT * FROM contact_requests WHERE id = :id LIMIT 1'); $stmt->bindValue(':id', $selectedId, PDO::PARAM_INT); $stmt->execute(); $selectedRequest = $stmt->fetch() ?: null; } if ($selectedRequest === null && $requests !== []) { $stmt = $pdo->prepare('SELECT * FROM contact_requests WHERE id = :id LIMIT 1'); $stmt->bindValue(':id', (int) $requests[0]['id'], PDO::PARAM_INT); $stmt->execute(); $selectedRequest = $stmt->fetch() ?: null; } } catch (Throwable $e) { error_log('Failed to load requests inbox: ' . $e->getMessage()); $errorMessage = 'The inquiry inbox is not available right now.'; } ?> <?= h($projectName) ?> โ€” Inquiry Inbox
Admin inbox

Contact requests

A minimal review view for messages submitted from the portfolio contact form.

Total requests
New
Today

No inquiries yet

Submit the contact form from the homepage to populate this inbox.

Open contact form

Inbox list

Select a request to inspect the full message.

Selected inquiry

Company
Project type
Budget
Message
Submitted
Source