I want to make a secure password with md5. I did encrypt on it: md5 ($ password). In the database, the password is stored as 7692f4у61. How can I ensure that when a user enters his password, he logged in, for it indicates that the password is not correct, as it is presented in a different form?

I, most likely, do not understand the principle of its work, I did not find anything on the Internet. Help me figure out how to use md5?

  • it is necessary to make md5 from the password entered by the user and compare it to the database already - Mike
  • five
    Do not use md5 anywhere else, especially in passwords. It has long been outdated, and for passwords has never been secure. Php has special functions for passwords php.net/manual/ru/function.password-hash.php - andreymal
  • one
    @ Lesha Volostnikov translate the password entered by the user into the same type of password and compare with the value from the database. And in general, read the documentation on the link given by me - andreymal
  • one
    And this link is also php.net/manual/ru/function.password-verify.php - andreymal
  • 2
    Collected in one place - php.net/manual/ru/faq.passwords.php - u_mulder

0