So I've doing this forgot login info field, and no sure how to retrieve the users password and send it it them. I can only ever get it to send a decrypted version and obviously the user needs to get their actual password. Thanks in advanced <?php include($_SERVER["DOCUMENT_ROOT"]."/community/database.php"); // input data into database $name = mysql_real_escape_string($_POST['name']); $email = mysql_real_escape_string($_POST['email']); $check = mysql_query("SELECT email FROM community WHERE email='$email'"); $name_exist = mysql_num_rows($check); if($name_exist > 0) { $query = "SELECT * from community WHERE email='$email'"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); $name = $row['name']; $password = $row['password']; $encryption = "d28bd9bgdcnsozk2"; // salt encryption $encryption .= $password; $password = $encryption; $password = md5($password); // md5 hashing $subject = "Login Info For Airwalk Design"; $message = "Hey bro, here is your login info for airwalk-design.com. Don't forgot it again! Name: $name Password: $emailpassword Regards, Danny @ Airwalk Airwalk: http://www.airwalk-design.com/ Facebook: http://www.facebook.com/airwalkdesign/ Twitter: http://www.twitter.com/airwalk_design Myspace: http://www.myspace.com/airwalk-design/ DeviantArt: http://airwalkdesign.deviantart.com/"; mail($email, $subject, $message, "From: Airwalk Design <no-reply@airwalk-design.com>\nX-MailerHP/" . phpversion()); header('Location: http://www.airwalk-design.com/community/login/'); } else { include($_SERVER["DOCUMENT_ROOT"]."/community/dontmove-head.php"); echo "<div class=\"blink\">Sorry man, I didn't recognise that email address - I don't think it's in our database. Please double-check it and try again.</div>"; include($_SERVER["DOCUMENT_ROOT"]."/community/missing-username.php"); include($_SERVER["DOCUMENT_ROOT"]."/community/dontmove-foot.php"); } ?>
Sorry, my friend but you can't decrypt md5 passwords, if the pass is not simple expression it's unbreakable.
Most the popular website doesn't provide you your old password ... They will rather provide you a link on your registered email to reset a new password and if you found some websites which provides your old password then they might not encrypting your password.