-1

I have a problem with my PHP & PDO login form. In fact, the script cannot find that the user already exists, whereas when I do the SQL command in phpMyAdmin, I get 1. Here is the piece of code in question:

$requser = $bdd->prepare("SELECT * FROM userInfo WHERE name = ? AND password = ?");
$requser->execute(array($pseudo, $password));
$userexist = $requser->rowCount(); //ERREUR

Here is the entire code link.

And the result link:

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • **Never store passwords in clear text or using MD5/SHA1!** Only store password hashes created using PHP's [`password_hash()`](https://php.net/manual/en/function.password-hash.php), which you can then verify using [`password_verify()`](https://php.net/manual/en/function.password-verify.php). Take a look at this post: [How to use password_hash](https://stackoverflow.com/q/30279321/1839439) and learn more about [bcrypt & password hashing in PHP](https://stackoverflow.com/a/6337021/1839439) – Dharman Jun 05 '20 at 21:34

1 Answers1

-1

I've remove my install verification process on the the top of the file. MySQL was busy. ->I've get a buffer error because of two sql commands.