往链点点通共享资源,了解更多请登录WL566
1,(index.asp 用户
登陆页面)
会员注册系统
2,(login.asp 用户数据处理文件)
<%
'打开数据库判断用户是否存在,info为表名,username为字段名
set rsc=server.createobject("adodb.recordset")
sqlc="select * from info where username='"&;amp;request.Form("username")&;amp;"' and
password='"&;amp;request.Form("password")&;amp;"'"
rsc.open sqlc,conn,1,1
session("username")=rsc("username")
session("password")=rsc("password")
session.Timeout=30
set rsc=nothing
response.Redirect("change.asp")
'如果用户不存在,session("username")为空
%>
3,(change.asp 用户信息修改页面)
<%
set rsc=server.createobject("adodb.recordset")
sqlc="select * from info where username='"&;amp;session("username")&;amp;"' password='"&;amp;session("password")&;amp;"'"
rsc.open sqlc,conn,1,1
nr=rsc("password")
username=rsc("username")
password=rsc("password")
sex=rsc("sex")
qq=rsc("qq")
and
mail=rsc("mail")
add=rsc("add")
personalinfo=rsc("personalinfo")
vv=rsc("ntime")
set rsc=nothing
if nr="" then
response.Redirect("index.asp")
end if
if strcomp(nr,request.Form("password"))=0 then
response.Write("欢迎你!"&;amp;request.Form("username"))
response.Write("你是在"&;amp;vv&;amp;"注册的")
session("username")=request.Form("username")
end if
if session("username")="" then
response.Redirect("index.asp")
end if
%>
<%
if strcomp(request.QueryString("ac"),"ch")=0 then
set rs=server.createobject("adodb.recordset")
sql="select * fr