• ----:)欢迎访问源码网(:----
    • 首页
    • 博客
    • 学院
    • 下载
    • 论坛
    • 影视
    • 发布源码
    • RSS
    • ITPig
    • 笑话网
    • 百家姓
    • 繁體中文

源码网 - 中国第一源码门户
选择镜像:网通镜像 - 电信主站
  • 首 页
  • 新闻动态
  • 网站运营
  • 网页制作
  • WEB开发
  • 编程开发
  • 图像媒体
  • 操作系统
  • 数据库
  • 服务器
热门搜索 优化 SEO 故事 cms IIS7 MySQL 个人 AdSense 主题推广 | 文章搜索: 高级搜索
会员登录/控制面版您的位置: 学院首页 >> WEB开发 >> ASP开发 >> 客户端相关 >> 详细内容
 

推荐文章

 
 

热点文章

  • 捉蜘蛛的ASP代码
  • 判断访问者的浏览器是否支持JavaScript和Cookies
  • 错误“操作必须使用一个可更新的查询”原因及解决办法
  • 判断访问者的浏览器是否支持JavaScript和Cookies
  • 关于在浏览器中执行*.exe文件的深入探讨
  • 下拉框连动的小例子
  • 如何在ASP中通过ODBC调用Excel中的数据
  • 怎样在网站上连接ORACLE数据库
  • 产生一个密码,并记录到数据库,然后发送给用户
  • 用ASP做一个记事本编缉器
  • ASP服务器组件编程心得
  • 在WAP网站上建立反馈表单
 
 

相关文章

  • 利用随机函数获取某一范围的整数及其应用
  • 如何在Web页面中集成文件上传功能
  • 开发连接远程SQL Server 的ASP程序应注意的..
  • ASP服务器组件编程心得
  • 如何只安装.NET的文档,而不安装.NET的FrameWork
  • 怎样在网站上连接ORACLE数据库
  • ASP与数据库运用:密码验证
  • 下拉框连动的小例子
  • 判断访问者的浏览器是否支持JavaScript和Cookies
  • ASP中文本文件与数据库文件的数据交换(FSO)
  • 企业级N Tier体系结构解决方案讨论
  • 纯ASP上传图像文件到数据库的最佳例子
 
 

百度搜索

 
 

产生一个密码,并记录到数据库,然后发送给用户

  • 阅览次数:
  • 文章来源: 网海之贝
  • 原文作者: 佚名
  • 整理日期: 2006-10-03
  • 发表评论
  • 字体大小:
  • 小
  • 中
  • 大

This article Generates a password random, Requires a database and Mails the Password.

<%@language="vbscript" %>

******************************
<%
'code by Manikantan
'Web Developer
'3rd Agenda
'Nungambakkam, Chennai India
%>

<%

set mail= server.CreateObject("cdonts.newmail")
mail.subject="Thank You for Registering"
mail.to = mailid mail.from ="Webmaster@thesite"
mail.body= "This is the Initial Password to our site...." & vbcrlf
&href='mailto:mailid="user@ursite.com'>mailid="user@ursite.com"
address="address"


'other data like phone number as per the member database in the site
'all these values are obtained from the request method from a .htm which submits to this file
'Mainly employed in registration
'Assumes You have cdonts.dll installed in the web server.

set conn = server.CreateObject("adodb.connection")
conn.Open "dsn","uid","pwd"
set rec= conn.Execute("select count(*) from membertable")
id = cint(rec.fields(0))+1
r=rnd *50
Response.Write r & "<br>"
for i = 0 to 20
if cint(r)>0 and cint(r)<26 then str=str +chr(97 + cint(r))
r=rnd *100
next

Response.Write str
pwd=left(str,2)
pwd=pwd & id
pwd=pwd & right(str,2)
pwd=pwd & second(time)

'An Update Query can be Passed from here for the username ,password and other details or can be triggered
from another page 'when the user responds to the mail...Something like sending a url as a mail and on
click of the url in the mail..call another page 'which updates ..so we can be sure that only confirmed
users are updated

%>
<br>
<%
set mail= server.CreateObject("cdonts.newmail")
mail.subject="Thank You for Registering"
mail.to = mailid
mail.from ="Webmaster@thesite"
mail.body= "This is the Initial Password to our site...." & vbcrlf & "Change it if You Want" & vbcrlf &
pwd & vbcrlf & "Thank You for Using the Site"
mail.send
%>


The New Pass word has been Mailed.
******************************

Regards
Vedachalam Manikantan

上一篇:MySQL数据库的导入导出 和 Liunx的权限
下一篇:构建支持Master/Slave读写分离的数据库操作类
  • 网友评论:
  • 查看所有评论
  • 我要发表评论
您的网名:
留言主题:
你要发表的内容:

 

关于本站 | 广告联系 | 版权声明 | 网站地图 | 发布软件 | 帮助中心 | 源码论坛

Copyright © 2005-2007 CodePub.Com  程序支持:木翼  滇ICP备05005971号