将加密密码发送到SQL数据库

I have a ticketing help desk and I want to edit my users' passwords. But the passwords are encrypted in database like this : $2a$08$IdljRhapMTPYzdB0l4t/AuHatF8imyNREH.yKtBZelmVJAi5Sa/c. I want to change the password in my help desk user_edit.php file and enter password field like this: password@123 and the server automatically encrypt it.

That's quite an unsafe solution, you should instead think of updating password. If needed, first encrypt it and than compare to the elder one to know if the user haven't typed the same password, which is unsafe.

You will need to find and reuse the code of the system that has created those passwords, or encrypts user entry as part of login.

For security you should encrypt passwords "one way". For logins you take the plain text input of the password, encrypt that in the same way that the password was originally and compare the encrypted texts, to see whether they are the same.

Find and reuse this encryption to add a new password.to your user.