Wanda Marston
asked on
Creatin a temporary random password in a PHP document
Forgot Password page
I am attempting to code a page were a user can go to create a temporary password which will be sent to their email address.
I have included some code at which point I receive the following error. - password_hash() expects at least 2 parameters, 1 given
I am attempting to code a page were a user can go to create a temporary password which will be sent to their email address.
I have included some code at which point I receive the following error. - password_hash() expects at least 2 parameters, 1 given
// Create a new, random password:
$p = substr(md5(uniqid(rand(), true)), 3, 15);
$ph = password_hash($p);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There are different methods for generating the password. It wants you to indicate which method you want to use. The others are listed in the link I gave in the answer
ASKER
Can I ask why "PASSWORD DEFAULT" makes a difference?