[英]mysql popup forgot password
我有一个忘记密码的表单,用于确认用户是否存在并发送一封带有密码重置链接的电子邮件,它工作正常,但我确实喜欢“电子邮件已发送......”的消息应该出现在弹出窗口中而不是相同页。
我试过这个但不起作用:
响应.php
var useremail = document.getElementById("email").value();
$.get( "validation.php?email=" function( response ) {
// console.log( response ); // server response
response = response.trim();
if(response == 1){
alert("Email sent....");
} else{
alert(response);
return false;
}
});
}`
形式:
<form class="register" id="email" action="forgot.php" method="post" onSubmit="checkAll();">
mysql
if ($result=="") { $result = "Email has been sent"; }
echo "<div>$result</div>";
}
?>```
我已经对所有内容进行了排序,现在它可以工作了,我在这里提供解决方案,希望可以帮助其他人:
function alert(){
echo "<script type='text/javascript'>";
echo "alert('Email has been sent - Please click on the link in the email to confirm.');";
echo "</script>";
}
if ($result=="") { $result = alert(); }
}
?>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.