ASP User Registration Instance Program

Source: Internet
Author: User

Create an Access database tutorial Db1.mdb, where you create a datasheet user, the fields are: U_uid (Automatic), U_user (user name: Text type), U_pass (password: text type)
Set up the form data sent from the receiving register.asp, and insert the successful display page of the registration in Datasheet User:


<%
' Method of string connection to database
Set Conn=server.createobject ("Adodb.connection")
Conn.Open "Driver=driver do Microsoft Access (*.mdb); uid=admin;pwd=;d bq=" &server.mappath ("Regdb1.mdb")
%>

Saving data to a database method

<%@ language=vbscript%>
<!--#include file= "con1.asp"-->

<meta http-equiv= "Content-type content=" text/html; charset=gb2312 "/>
<title> Registration succeeded </ Title><br>
<body>
<%
' Establish Recordset object method
Set Rst=server.createobjec T ("Adodb.recordset")
Set Rst1=conn.execute (insert into user (U_user,u_pass) VALUES (' "&request.form (" U_user ") & "', '" "&request.form (" U_pass ") &" ') "
%>
<table width=" 0 "border=" center ">
<tr>
<td align= "center" ></ Td>
</tr>
</table>
</body>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.