Checking email uniqueness in php
I am building a basic user authentication system in PHP 8 using PDO and native sessions ($_SESSION), and I would like to verify if my implementation follows current security best practices—specifically regarding session fixation protection, Post/Redirect/Get (PRG) with flash messages, and input handling. <?php session_start(); if (isset($_SESSION['usuario'])) { header('Location: bienvenida.php'); exit; } require_once 'bd.php'; $errores = []; $nombre = ''; $email = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $nombre = trim($_POST['nombre'] ?? ''); $email = trim($_POST['email'] ?? ''); $con
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.