How would i go about adding a function that checks the db for the users sha1 password value?
In PHP there is a sha1() function already. So it's as simple as calling this function: if (sha1($userInput) == $yourStoredPassword) // The password is correct But remember that sha1 without any salt is not a very secure hashing solution.
sha1()
if (sha1($userInput) == $yourStoredPassword) // The password is correct