Dehashing a password for logging in

I’m setting up a login map where they will enter their username and password. Only for security, I hashed the password prior to saving into the database. How do I make sure that the user’s password is the same as the password that was saved?

There is nothing like de-hashing. A hash function is a one way function, that’s one of the point of using a hash function. To check if the password is correct you just hash the password the user has just entered and you compare the hash with the hash stored in your database.

Though i strongly recommend you have a look at this video