展会信息港展会大全

asp用户注册实例程序 android软件开发教程
来源:互联网   发布日期:2016-03-01 11:41:14   浏览:2228次  

导读:asp教程用户注册实例程序建立access数据库教程db1.mdb,在其中建立数据表user,字段分别为:u_uid(自动),u_user(用户名:文本型),u_pass(密码:文本型) 四、...

asp教程用户注册实例程序

建立access数据库教程db1.mdb,在其中建立数据表user,字段分别为:u_uid(自动),u_user(用户名:文本型),u_pass(密码:文本型)

四、建立接收register.asp中发送过来的表单数据,并插入到数据表user中的注册成功显示页面:

<%

'字符串连接数据库的方法

set conn=server.createobject("adodb.connection")

conn.open "driver=driver do microsoft access (*.mdb);uid=admin;pwd=;dbq="&server.mappath("regdb1.mdb")

%>保存数据到数据库方法

<%@ 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>

赞助本站

人工智能实验室

相关热词: 开发 编程 android

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港