prepare("INSERT INTO contacts (name, email, phone) VALUES (?, ?, ?)"); $stmt->execute([$name, $email, $phone]); } catch (PDOException $e) { // In a real app, you'd log this error. // For now, we'll just ignore it for this simple example. } } } header('Location: index.php'); exit; ?>