The passwords in my database is now text and I just figured that I can use md5() function to convert the passwords to hashes, but now I want to convert all of my users in the database to hashes any idea to do that so I should not need to tell everybody to reenter their passwords,
This question is not duplicated with any other question Like Convert text passwords in database to hashed passwords?, because I want to know an idea how to do that in PHP, and Secure hash and salt for PHP passwords is also not duplicated because I want to change all password which exist already in my database I should not need to ask all of my user to change their passwords as I said above,
Any ideas?
All you have to do for your example is run each password through the hash (which I recommend is not md5 since that one now has known weaknesses) and store the hash back. Then when someone tries to log in, take their password and hash it, then compare the hash to what you have in the database. If you currently store the plaintext, you should not have to ask the users to renter anything, just hash what you have already.