Forgot password
|
is_valid) {
// What happens when the CAPTCHA was entered incorrectly
//die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." . "(reCAPTCHA said: " . $resp->error . ")");
echo '
The reCAPTCHA was not entered correctly.Try it again.' ;
}else{
$recover_email=$_POST['recover_email'];
$sql = mysql_query("SELECT username,pass_word FROM register WHERE email ='$recover_email'") or die(mysql_error());
$result = mysql_fetch_array($sql);
$user = $result['username'];
$password = $result['pass_word'];
$check_msg = "Bestcasinosreview.com";
$from = "bestcasinoreview@gmail.com";
$to = $recover_email;
$message='
Bestcasinosreview.com |
Hi '.$user.",".' |
We just received your request for sending your account password. |
Your password:'.$password.' |
Your User Name:'.$user."".' |
Thanks |
Site Admin |
';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= 'From: <'.$from.'>' . "\r\n";
if(mail($to, $check_msg, $message, $headers))
echo '';
}
}
}
?>