The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Need help with login form Reply To: Need help with login form


There is no sort of money involved nor is it a service.

This actually isn’t relevant. You still have a duty to protect your users.

Your login isn’t working because you are hashing the submitted password and seeing if it exists in the database. It won’t. Password hash uses a new salt each time.

Only use password hash during registration to save a hash to the database. From then on retrieve the hash and use password verify to compare the submitted password to the stored hash.

Seriously though, there’s no shame in just using an existing script for this stuff. Session management is a solved problem (most apps really don’t need to be written from scratch) and I don’t really understand why you’re doing this yourself.