每日博客

时间:大约一个多小时

代码:100来行?

博客:1

知识点:php

require("lineMysql.php");
$email = stripslashes(trim($_POST['mail']));
global $db;
$token = stripslashes(trim($_GET['token']));
$email = stripslashes(trim($_GET['email']));
global $db;
$select = $db->findpwd("user", $email);
$row=$db->rows($select);
if($row){
    $mt = md5($row['username'].$row['password']);
    if($mt==$token){
        if(time()-$row['getpasstime']>24*60*60){
            $msg = '该链接已过期!';
        }else{
//重置密码...
            $msg = '请重新设置密码,显示重置密码表单,<br/>';
        }
    }else{
        $msg = '无效的链接';
    }
}else{
    $msg = '错误的链接!';
}
echo $msg;
原文地址:https://www.cnblogs.com/hfy717/p/14904694.html