Basically, you can't. MD5 is a one-way encryption (or "hashing") algorithm. Normally if you're going to use hashing for passwords, then all you can do is generate a new password (perhaps using uniqid() to get a random string), then send that to the user with either a recommendation or a requirement that they reset it to whatever password they'd like to use when they next log in.