Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getUsuario($conexion, $usuario, $password) {
- $sentencia = "SELECT * FROM alumnos WHERE email='".$usuario."' AND password='".$password."'" like %$usuario%;
- $stmt = $conexion->prepare($sentencia);
- // Especificamos el fetch mode antes de llamar a fetch()
- $stmt->setFetchMode(PDO::FETCH_ASSOC);
- // Ejecutamos
- $stmt->execute();
- // Devolvemos los resultados
- return $stmt->fetch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement