Apply(); $body = $tp_sendmail->generate(); $body = set_full_url($body); $ToEmail = $email; $FromSubject = "Password Reset"; $FromEmail = "support@cnwcorp.co.th"; $FromName = "FotoConnect Support"; $headers = "From: support@cnwcorp.co.th\nReply-To: ".$FromEmail."\nContent-Type: text/html; charset=utf-8"; send_email("", $ToEmail, "$FromName", $FromEmail, $FromSubject, $body, true, $attachs); $err_msg = "Your new password was generated and sent to your e-mail address."; header('Refresh: 5; url=../sign-in/'); } else if ($row["status"] == 1) { $err_msg = "Your account is suspended."; } else { $err_msg = "Invalid email address."; } } mysqli_free_result($objResult); mysqli_close($objDb); } ?> FOTOCONNECT | RESET PASSWORD