What are the security risks of storing passwords in plain text in PHP scripts?
Storing passwords in plain text in PHP scripts poses a significant security risk as anyone with access to the script can easily view the passwords. To mitigate this risk, passwords should be securely hashed before storage using a strong hashing algorithm like bcrypt.
$password = "myPassword123";
$hashedPassword = password_hash($password, PASSWORD_BCRYPT);