' 申请 . html head title 闪亮日子之用户密码核实 /title /head div align="center"center table border="0" cellspacing="0" width="600" height="15" />
欢迎来到入门教程网!

编程问答

当前位置:主页 > 网络编程 > 编程问答 >

如何取回已忘记的密码?

来源:本站原创|时间:2020-01-11|栏目:编程问答|点击:

forget.asp<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

' 申请.

<html>

<head>

<title>闪亮日子之用户密码核实</title>

</head>

<div align="center"><center>

<table border="0" cellspacing="0" width="600" height="158" >

  <tr>

    <td height="67"><p align="center">闪亮日子<br>

    用户密码核实</td>

  </tr>

  <tr>

    <td height="63"><p align="center"><font color="#0000FF">请正确填写您的邮件地址,我们会在核实后,尽快将密码寄给您!</font></p>

    <form method="POST" action="sendit.asp">

      <div align="center"><center><p>您的邮件地址: <input type="text" name="email"

      size="20" style="font-size: 12pt"> <input type="submit" value="确定"

      style="font-size: 12pt"> </p>

      </center></div>

    </form>

    </td>

  </tr>

</table>

</center></div>

</body></html>

 

sendit.asp

' 确认.

<%@ LANGUAGE="VBscript" %>

<% Option Explicit %>

<%

Dim DATA_PATH, objDC, objRS, email, user, pass, sendmail

DATA_PATH=Server.Mappath("users.mdb")

' 打开数据库.

 

Set objDC = Server.CreateObject("ADODB.Connection")

objDC.ConnectionTimeout = 15

objDC.CommandTimeout = 30

objDC.Open "DBQ=" & DATA_PATH & ";Driver={Microsoft Access Driver (*.mdb)};  DriverId=25;MaxBufferSize=8192;Threads=20;", "admin", "password"

Set objRS = Server.CreateObject("ADODB.Recordset")

email=request.form("email")

objRS.Open "select * from USERS WHERE email = '" & email & "'", objDC, 0, 1

' 校验用户的信箱是否存在.

%>

 

<html>

<head>

<title>山水盈盈之邮件地址错误提示</title>

</head>

<body>

<%

if objrs.EOF then

%>

<font color="red">

</font><div align="center"><center>

<table border="0" cellspacing="0" width="600" height="100" >

  <tr>

    <td height="64"><p align="center">山水盈盈<br>

    邮件地址错误提示</font></td>

  </tr>

  <tr>

    <td height="37"><font color="red"><p align="center">对不起,该用户邮件信箱:<%=email%>不存在!

    </font></td>

  </tr>

</table>

</center></div>

</body></html>

</font></B>

<% Else %>

 

<%

email = request.form("email")

' 从数据库中选取与递交的信箱对应的帐号,密码.

user = objrs.Fields("username")

pass = objrs.Fields("password")

Set sendmail = Server.CreateObject("CDONTS.NewMail")

sendmail.From = webmaster@intels.net

' 网管信箱.

sendmail.To = email

sendmail.Subject = "您的登录信息,请保存好!"

' 邮件主题.

sendmail.body = "您在山水盈盈的登录资料是:" & vbCrlf & vbCrlf _

& "Username=" & user & vbCrlf _

& "Password=" & pass & vbCrlf

' 邮件内容.

sendmail.Importance = 2

sendmail.Send

%>

您的资料已发送到<%=email%>,请收好,欢迎再次光临!<br>

<%

    objDC.Close

Set objRS =  Nothing

Set objDC = Nothing

Set sendmail = Nothing

%>

<%end if%>

[1]

上一篇:如何做一个随机密码产生器?

栏    目:编程问答

下一篇:如何在线更改密码?

本文标题:如何取回已忘记的密码?

本文地址:https://www.xiuzhanwang.com/a1/bianchengwenda/12099.html

网页制作CMS教程网络编程软件编程脚本语言数据库服务器

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:835971066 | 邮箱:835971066#qq.com(#换成@)

Copyright © 2002-2020 脚本教程网 版权所有