Skip to content
Advertisement

I have some trouble with PHP sha256 Hash [closed]

I want to hash the user input and save it in a database but i only safe the same hash every time no matter what password i enter in. Why is this so ? i know that the function return the hash as hezadezimal but it should be diffrent with other passwords?

JavaScript

P.S: i know this isnt the securest code, its only for test purposes where i can understand a little bit about sql injections

Advertisement

Answer

That’s because of this line:

JavaScript

It should be $_POST["passwort"], just a mispelling

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement