PHP MD5 not working in if statement -


I am having trouble comparing a submitted password and there is one thing called from the database. Both are equal to the same output, but when compared to a statement, they are not equal to one another

    

Both pies & amp; TestUserPin = ad0234829205b9033196ba818f7a872b But if statement is wrong in the statement that they do not match

You must enter the password Do not use md5 because it is broken, instead its more secure

using BCRYPT

on the register page

  $ pass = "User password"; $ Secure_pass = password_hash ($ pass, PASSWORD_BCRYPT) ;; // Secure Hashed Pass on the login page   

----

  $ pass_by_user = "Password entered by user in login page"; $ Pass_in_db = "User password obtained from mysql table using email or other non sensitive data"; $ Correct_pass = password_verify ($ pass_by_user, $ pass_in_db); // Database password and password entered    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -