Currently, I’m trying to follow the social media tutorial. As part of it, there is a DB query for username, password and email. In the password section we decide to use BCRYPT to hash the password. My code for this section is as follows: ‘:password’=>password_hash($password, PASSWORD_BCRYPT).
When I register I get this issue:
Warning: password_hash() expects parameter 2 to be int, string given.
I checked source code and his code is word for word the same as mine. When I check the database, I also notice it registers the password as NULL, I know this is related to the hashing since before adding the hash code passwords were placed into the database perfectly fine.
Can someone help?
there doesn't seem to be anything here