I have a login form with email and the password. For password I am using crypt() function to hash. My mysqli query is
$stmt = $mysqli -> prepare("SELECT salt, password FROM table WHERE email=? "))
{
$stmt -> bind_param("s", $email);
$stmt -> execute();
$stmt -> bind_result($salt,$password);
$stmt -> fetch();
$stmt -> close();
}
$password_encrypt = crypt($_POST['password'], '$2y$07$' . $salt);
if ($password_encrypt != $password)
{echo "invalid";}
question: For validation it takes 8 to 10 seconds. Am I doing anything wrong?
note: my form data is posting via ajax call.In my table email is indexed.