What are common pitfalls when using MD5 hashes for password storage in a PHP login system?

Using MD5 hashes for password storage in a PHP login system is not secure because MD5 is considered a weak hashing algorithm that can be easily cracked using rainbow tables. It is recommended to use stronger hashing algorithms like bcrypt or Argon2 for password storage to enhance security.

// Example of using bcrypt for password hashing in PHP
$password = "password123";
$hashed_password = password_hash($password, PASSWORD_BCRYPT);