Apologies for the simple question but i am still learning php/mysql
I'm attempting to hash passwords on registration, which works, however once the hashing is complete the user cannot log in with their password. Below is a small snippet of my variables
$password = hash('sha512',$_POST['password']);
$confirmPassword = hash('sha512',$_POST['confirmPassword']);
->So, the password is matched with confirm password and then they are compared using Javascript and PHP, if they match the data gets inserted into the database. So why isnt it allowing the user to log in?
Currently in my Database my password column is set to CHAR(128) if that helps?
The size of your password column is too small.Do a simple:
echo sizeof(hash('sha512',$_POST['confirmPassword']));
and get the right size of your database column.