hello there.
I try to make password reset function, but I could not figure out why it occurs error message
followings are the codings that I have.

First, php part


and, html form part



       
           
           
       
       
       
           
               
           
       
   

When I switch $resetpass to $ramdom in the sentence "$stmt = $DB_con->prepare("UPDATE users SET user_pass=$resetpass WHERE user_email=:umail");, it works but I tried to use password_hash function for my database.

Is it supposed not to work password_hash function with rand() function?

Thank you for your help in advance.

Best