Click here to Skip to main content
15,904,346 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
password_hash($_POST['password'], PASSWORD_BCRYPT) );

This is a just littel cut I used to code my signup page.
Problem is my login page how to code login so that the 50 char long hashed password match>?
I can however copy password hashed one from table and paste it iin password and login
sucessfully @!

I hope question is not muddy and correct understood thanks for any input!1

Welll I tried this
$password = password_hash($_POST["password"], PASSWORD_BCRYPT);

to embed the provided login password with the same method as when signup
but not logic enough obviously, it comes up with a different password.

What I have tried:

i have tried different methods
Posted
Updated 21-Jan-18 3:50am
v2

1 solution

When a user tries to log in, hash the password they provided. Check if that hash corresponds to the hash saved in the database. If it does, let them in.

(Also, related: to increase the safety of your password storing even more, use a salt[^] with your hashes.)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900