Rows($sql); if($r[0]['email']<>'') { #SEND MAIL $to=$email; $password = $r[0]['password']; $fullname = $r[0]['fullname']; require 'email_templates/email_forgot_password.php'; $from='info@HoiDoanhNhan.Vn'; $subject = "Hội Doanh Nhân - Quên mật khẩu"; $headers = 'MIME-Version: 1.0' . "\r\n". 'Content-type: text/html; charset=utf-8'. "\r\n". 'From: '.$from. "\r\n" . 'Reply-To: '.$email . "\r\n" . 'X-Mailer: PHP/'; $message=$strMESSAGE; mail($to, $subject, $message, $headers); #END SEND MAIL header("Location: forgot_password_success.php"); } else { $lblDisplay = "Không tìm thấy Email: ".$email." trong hệ thống."; } } #-------------------------------------------------------------------------- $smarty->assign('lblDisplay',$lblDisplay); #-------------------------------------------------------------------------- $smarty->display($template_root.'forgot_password.tpl'); ?>