What is the common issue with using MD5 for password encryption in PHP login scripts?

Using MD5 for password encryption in PHP login scripts is not secure because MD5 is a fast hashing algorithm that can be easily cracked using rainbow tables or brute force attacks. To solve this issue, it is recommended to use stronger hashing algorithms like bcrypt or Argon2 for password encryption in PHP.

// Hashing a password using bcrypt
$password = "password123";
$hashed_password = password_hash($password, PASSWORD_BCRYPT);

// Verifying a password
$entered_password = "password123";
if (password_verify($entered_password, $hashed_password)) {
    echo "Password is correct!";
} else {
    echo "Password is incorrect!";
}