每日博客

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;

 

posted @ 2021-09-17 19:41  谦寻  阅读(15)  评论(0编辑  收藏  举报