M4CH4D0_'s postagem in [Problema][PHP] Statement (MYSQL + PHP) was marked as the answer
Tenta:
try {
$conn = new PDO("mysql:host=localhost;dbname=logins", "root", "", array(PDO::ATTR_PERSISTENT => true));
$conn->exec("set names utf8");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
print('Erro na conexão: '.$e->getMessage());
exit();
}
$login = $conn->prepare("SELECT * FROM `logit` WHERE `username`=?");
$login->execute([$_POST['Nick']]);
$message = "O usuário {$_POST['Nick']} não foi encontrado";
if($login->rowCount() > 0)
{
$message = "Bem-vindo, {$_POST['Nick']}";
}
echo $message;
$conn = null;