我要做的是在发送电子邮件后输入我输入的链接中的文本。这样的事情。
$ForgotID = 'DN6ZPzA6247yWhHaFbXi';
$messageBody = '<a href="https://******.com/ResetPasswordForm.php?id='.$ForgotID.'">Click here to change your password.</a>';
然后当用户点击链接时,它会重定向到给定的链接,然后我如何获得id='_____________________'
?所以,这是我在更新密码之前搜索数据库中特定行的方法。我怎么做的?谢谢你们。
答案 0 :(得分:1)
电子邮件消息:
<?php
$ForgotID = 'DN6ZPzA6247yWhHaFbXi';
$messageBody = '<a href="https://******.com/ResetPasswordForm.php?id='.$ForgotID.'">Click here to change your password.</a>';
?>
ResetPasswordForm.php (在ResetPasswordForm.php
上)
//On Click On Mail Verification Link
//Browser Url: https://******.com/ResetPasswordForm.php?id=DN6ZPzA6247yWhHaFbXi
<?php
$id = $_GET['id'];
//Now After Get This $id Here, Check In Your Table in Verification_code Column ,
//Where its found ! and if Found Then Take Email Id And Change the Password and Update it,
//And if Not Found Then Display the message token mismatch.
?>