$this->display(findd);}
public function findd(){
$uname=$_REQUEST['username'];
$user=D('User');
$res=$user->where("username='$uname'")->find();
if($res)
{
echo "用户名:".$res['username']."<br/>";
echo "您丢失的密码为:".$res['password'];
redirect('/wu_liuliu/index.php/Home/Denglu/show',1,"已找到密码,正在跳往登陆页面...");
}
else
{
$this->error('登录失败!若果您忘记密码,可以通过用户名','__URL__/findd');
}
}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>快乐LIFE</title>
<style>
#a{
width:414px;
height:427px;
position:absolute;
left: 435px;
top: 285px;
}
#b{
width:602px;
height:570px;
position:absolute;
left: 300px;
top: 42px;
background-image:url(/wu_liuliu/Public/images/b.jpg)
}
#c{
width:414px;
height:427px;
position:absolute;
left: 410px;
top: 204px;
}
</style>
</head>
<body><form action="__URL__/findd" method="post">
<div id="b"></div>
<div id="c">
<div align="center"><h1><strong>快来找回密码吧!!!!</strong></h1></div>
</div>
<div id="a">
<table width="449" height="133" align="center">
<tr>
<td width="130">请输入用户名:</td>
<td width="307"><input type="text" name="username" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="确定" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>