asp网站制作会的来

来源:百度知道 编辑:UC知道 时间:2024/06/30 08:38:53
本人急需一个登入和注册页面原代码
要求:登入页 只要用户名和密码就可以 加一个登入按钮
注册页 也只要有用户名和密码就可以 就要最简单的
只要能后台数据库就可以
我现在主要就是不知道怎么样把注册页的信息写入数据库

能用的我再给20分
<FORM name=frmlogin action="checklogin.asp" method=POST>
<tr><td>用户<input type=text name="username" size="10">
<br>密码<input type="password" name="userpassword" size="10"><br>
<input type="submit" value="提交" name="B3"><input type="reset" value="重置" name="B4"> </font>
</td></tr>
</FORM>
这个里面的"checklogin.asp"页弄呀 要全的代码

<!--#include file="../opendb1.asp" -->
<%
username=trim(request.Form("username"))
pwd=trim(request.Form("password"))
strSQL = "Select * from “..你的数据库的名称” Where “..你的数据库里的表里的值“="&"'"&username&"'" &" AND ”..你的数据库里的值“ ="&"'"&pwd&"'"
rst.CursorType=3
rst.open strSQL
if rst.RecordCount=0 then
%>
<script language=vbscript>
msgbox "密码不正确或用户名不对!",48,"登录信息"
window.history.go(-1)
</script>
<%

else
Session("UserName")=rst("nicheng")
Session("UserID1")=rst("ID")
Session("UserName1")=rst("nicheng")
Session("UserID1")=rst("ID")
end if
%>

<!--#include file="../closedb1.asp" -->