please consider my solution is right or not

Hello everyody I have a site where the user logged in before having access to others pages. I want to know if it's possile to hash the password of my admin in the php, echo it then i will know the password hash and then store it in the database. ecause only the admin can add user in the database and when he add it, those passwords will be hash. And what i don't want all the passwords in my user table to be hashed expect the admin one. Do you think that my solution is correct ? If no what would you suggest me to do. Thanks for the help/advice .
You already invited:

Marion

Upvotes from:

Your question doesn't make much sense to be honest. First you're saying you want to echo out password hashes. Then you're saying you don't want all the passwords the be hashed except the admin password? Anyway, you should always hash passwords. No matter who they belong to. Many people out there use the same password on different websites and services. If your database gets hacked, they become extremely vulnerable. Aside from that, I really see no reason why you should be able to read out passwords as plain text. As the admin / owner of your website, you don't need to know their passwords to access their data. So unless you plan to use those passwords to hack your users yourself, there's simply no "valid" reason to be able to read them.

If you wanna answer this question please Login or Register