prepare(" UPDATE `user` SET `password` = :password WHERE `userID` = :userID "); $stmt->bindParam(":password", $_POST["password"]); $stmt->bindParam(":userID", $_POST["u"]); $stmt->execute(); } function verifyLink(int $userID, string $hash) { $stmt = $GLOBALS["db"]->prepare(" SELECT `password` FROM `user` WHERE `userID` = :userID "); $stmt->bindParam(":userID", $userID); $password = $stmt->fetch()["password"]; return password_verify($password, $hash); }