教程集 www.jiaochengji.com
教程集 >  脚本编程  >  Asp.net  >  正文 asp用户注册实例程序

asp用户注册实例程序

发布时间:2016-09-26   编辑:jiaochengji.com
教程集为您提供asp用户注册实例程序等资源,欢迎您收藏本站,我们将为您提供最新的asp用户注册实例程序资源

建立access数据库教程db1.mdb,在其中建立数据表user,字段分别为:u_uid(自动),u_user(用户名:文本型),u_pass(密码:文本型)
四、建立接收register.asp中发送过来的表单数据,并插入到数据表user中的注册成功显示页面:

<blockquote>
<%
'字符串连接数据库的方法
set conn=server.createobject("adodb.connection")
conn.open "driver=driver do microsoft access (*.mdb);uid=admin;pwd=;dbq="&server.mappath("regdb1.mdb")
%></blockquote>

保存数据到数据库方法

<blockquote>

<%@ language=vbscript %>
<!-- #include file="con1.asp"-->
<html >
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title>注册成功</title><br>
</head>
<body>
<%
'建立recordset对象方法
set rst=server.createobject("adodb.recordset")
set rst1=conn.execute("insert into user (u_user,u_pass) values('"&request.form("u_user")&"','"&request.form("u_pass")&"')")
%>
<table width="300" border="0" align="center">
<tr>
<td align="center"><img src="chenggong.jpg" alt="注册成功" width="297" height="201"></td>
</tr>
</table>
</body>
</html>

</blockquote>

您可能感兴趣的文章:
ASP 3.0高级编程(六)
asp用户注册实例程序
asp入门教程:ASP Request 简单介绍
突破性的ASP 技术
Global.asa文件的使用及Chat程序
asp.net UrlEncode对应asp urlencode的处理方法
asp ajax检测用户名是否在存
动态加载用户控件(整理)
IIS的使用
ASP Application 对象教程

[关闭]
~ ~