What are some potential security risks associated with storing passwords in md5 format in a PHP login system?
Storing passwords in md5 format in a PHP login system poses a security risk because md5 is a weak hashing algorithm that can be easily cracked using modern hardware and techniques. To improve security, passwords should be stored using a stronger hashing algorithm such as bcrypt or Argon2.
// Storing passwords using bcrypt hashing algorithm
$hashed_password = password_hash($password, PASSWORD_BCRYPT);