PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, ]; try { $pdo = new PDO($dsn, $cfg['db_username'], $cfg['db_password'], $options); } catch (PDOException $e) { exit('Database connection failed: ' . $e->getMessage()); } $app_id_raw = $_GET['id'] ?? ''; $token = $_GET['token'] ?? ''; $app_id = preg_match('/^\d+$/', $app_id_raw) ? $app_id_raw : '0'; // Fetch applications $stmt = $pdo->query("SELECT id, reference, client_email FROM applications ORDER BY id DESC"); $applications = $stmt->fetchAll(); ?>
| ID | Reference | Client Email | Actions |
|---|---|---|---|
| = $app['id'] ?> | = htmlspecialchars($app['reference']) ?> | = htmlspecialchars($app['client_email']) ?> | Edit Timeline View as Client |