Login Register Unity C# PHP MySQL

Job ID: 33943398

Budget: $10 – $30 USD

Hello,
I've a problem with crypt password hash & salt
Login.php
$existinginfo = mysqli_fetch_assoc($namecheck);
echo $existinginfo["score"];
$salt = $existinginfo["salt"];
$hash = $existinginfo["hash"];
$loginhash = crypt($password, $salt);
if($hash != $loginhash) {
echo "6: Incorrect password";
exit();

}
--------
Register.php
$salt = "\$5\$rounds=5000\$" . "steamedhams" . $username . "\$";
$hash = crypt($password, $salt);

-----------
But it keeps saying that the password is incorrect when i try to login via implemented ui login
Related categories: PHP C# Programming Software Architecture MySQL Unity 3D