Forgot password example using PDOCrud

You can easily create forgot password form using only few lines of codes. It will automatically send email (based on the config email settings) with new password details. Please note the password will be reset and hashed/encrypted before sending to email.You can set hashing/encryption type also.
$pdocrud = new PDOCrud(); /* * @param string $email Email field of the table * @param string $password password field of the table * @param string $from from email to be used to send email * @param string $subject subject of the email * @param string $message message of the meail * @param string $encryption encryption to be used, default type md5 * */ $message = "Here is your new password {password}"; $subject="Password has been updated successfully"; $pdocrud->forgotPassword("email","password", array("info@pdocrud.com"),$subject,$message); $pdocrud->setLangData("login", "Retrieve Password"); echo $pdocrud->dbTable("users")->render("SELECTFORM");