note 129877 added to about.formats

From: Date: Tue, 26 Nov 2024 14:00:54 +0000
Subject: note 129877 added to about.formats
Groups: php.notes 
Request: Send a blank email to php-notes+get-221678@lists.php.net to get a copy of this message
class Dao { private $conexion; public function __construct($conexion) { $this->conexion = $conexion; } public function obtenerUsuarioEmail($emailUsuario, $passwordUsuario) { try { $sql = "SELECT password FROM usuario WHERE email = :email"; $stmt = $this->conexion->prepare($sql); $stmt->bindValue(':email', $emailUsuario, PDO::PARAM_STR); $stmt->execute(); $usuario = $stmt->fetch(PDO::FETCH_ASSOC); if ($usuario && password_verify($passwordUsuario, $usuario['password'])) { return true; } return false; } catch (PDOException $e) { // Mostrar el error en un entorno de desarrollo echo "Error en la consulta: " . $e->getMessage(); return false; } } ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.137 (proxied: 31.4.134.44) ---- Manual Page -- https://php.net/manual/en/about.formats.php Edit -- https://main.php.net/note/edit/129877 Del: integrated -- https://main.php.net/note/delete/129877/integrated Del: useless -- https://main.php.net/note/delete/129877/useless Del: bad code -- https://main.php.net/note/delete/129877/bad+code Del: spam -- https://main.php.net/note/delete/129877/spam Del: non-english -- https://main.php.net/note/delete/129877/non-english Del: in docs -- https://main.php.net/note/delete/129877/in+docs Del: other reasons-- https://main.php.net/note/delete/129877 Reject -- https://main.php.net/note/reject/129877 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221678) next »