這個問題我已經通過電子郵件發送,如何發送密碼鏈接到用戶的電子郵件,當用戶點擊忘記密碼鏈接....發送密碼鏈接到時用戶忘記密碼
這裏是ForgetPasswordViewController.php ...我開發本作只是呈現出警報...... 不過來實時的時候..我不知道如何發送密碼鏈接..用戶電子郵件...
<?php
header("Cache-Control: private, must-revalidate, max-age=0");
header("Pragma: no-cache");
header("Expires: Fri, 4 Jun 2010 12:00:00 GMT");
//如果未提交表格HTML將直接顯示
if (!isset($_POST['submit']))
{
?>
<html>
<body>
<form name='f1' method="POST" action="" onSubmit="return ValidateEmail();">
<div id="fp">
<span style="margin-left:-50px">Email:</span>
<span><input class="input" type="text" name="Email" placeholder="Enter mailID" required></span><br>
<input style="height:50px; width:120px; background:url(Images/submit_butto.gif) no-repeat right top; border: none;" type="submit" name="submit" value="">
<?PHP
}
else
{
$Email=$_POST['Email'];
if(!empty($Email))
{
$model = new UsersModel();
$rowsCount = $model->checkUserEmail($Email);
echo $rowsCount;
if ($rowsCount!=0)
{
//If you are submitting the form insert the details into database
echo '<script type="text/javascript">alert("A password hasbeen sent to your Email..");
window.location.href="LoginViewController.php";</script>';
}
else
{
echo'<script type="text/javascript">alert("Enter valid email");
window.location.href="ForgetPasswordViewController.php";</script>';
}
}
}
?>
</body>
</html>
個
任何建議是可以接受的....
具體是什麼問題,簡單的教程?你不知道如何創建鏈接?你不知道如何發送電子郵件? – deceze
@deceze問題我不知道如何發送電子郵件... –
只是一個額外的有趣閱讀: http://stackoverflow.com/a/1069799/1063823 – Duikboot