prepare('INSERT INTO users (email, password_hash, full_name, affiliation, pd_consent) VALUES (?, ?, ?, ?, ?)'); try { $stmt->execute([$email, $hash, $fullName, $affiliation, $consent]); header('Location: login.php?registered=1'); exit; } catch (\PDOException $e) { $error = 'Пользователь с таким email уже зарегистрирован.'; } } } ?>