prepare("SELECT * FROM staff WHERE slug = ?"); \(stmt->execute([\)slug]); \(user =\)stmt->fetch(PDO::FETCH_ASSOC); if (!$user) { die("Invalid staff card."); } // Dynamic vCard Download Trigger if (isset(\(_GET['download']) &&\)_GET['download'] === 'vcard') { \(cleanFileName = preg_replace('/[^A-Za-z0-9_\-]/', '_',\)user['full_name']); header('Content-Type: text/vcard; charset=utf-8'); header('Content-Disposition: attachment; filename="' . $cleanFileName . '.vcf"'); echo "BEGIN:VCARD\r\n"; echo "VERSION:3.0\r\n"; echo "FN:" . $user['full_name'] . "\r\n"; echo "TITLE:" . $user['job_title'] . "\r\n"; echo "EMAIL;TYPE=WORK:" . $user['email'] . "\r\n"; echo "TEL;TYPE=CELL:" . $user['phone'] . "\r\n"; if (!empty($user['linkedin'])) { echo "URL:" . $user['linkedin'] . "\r\n"; } echo "END:VCARD\r\n"; exit; } ?> | Contact Card