asp登陸原代碼正確版(共7頁)_第1頁
asp登陸原代碼正確版(共7頁)_第2頁
asp登陸原代碼正確版(共7頁)_第3頁
asp登陸原代碼正確版(共7頁)_第4頁
asp登陸原代碼正確版(共7頁)_第5頁
已閱讀5頁,還剩2頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、精選優(yōu)質(zhì)文檔-傾情為你奉上1、(index.asp 用戶登陸頁面)<!- #include file="conn.asp" -><!- 悠悠長假期 -><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>會(huì)員</title><style type="text/css"><!-body,td,th

2、 font-family: 宋體; font-size: 14px;-></style></head><body><center><p>會(huì)員注冊(cè)系統(tǒng)</p><form name="form1" method="post" action="login.asp"><table width="34%" border="0"><tr><td width="33%"

3、height="30">用戶名:</td><td width="67%" height="30"><input name="username" type="text" id="username" size="15"></td></tr><tr><td height="30">密 碼:</td><td height="30

4、"><input name="password" type="password" id="password" size="15"></td></tr><tr><td colspan="2" align="center"><input type="submit" name="Submit" value="確定"><input

5、type="reset" name="Submit" value="重置"></td></tr><tr><td colspan="2"><a href="reg.asp" target="_self">注冊(cè)</a></td></tr></table></form></center></body></html>2、(l

6、ogin.asp 用戶數(shù)據(jù)處理文件)<!- #include file="conn.asp" -><%'打開數(shù)據(jù)庫判斷用戶是否存在,info為表名,username為字段名set rsc=server.createobject("adodb.recordset")sqlc="select * from info where username='"&request.Form("username")&"' and password='"

7、;&request.Form("password")&"'"rsc.open sqlc,conn,1,1session("username")=rsc("username")session("password")=rsc("password")session.Timeout=30set rsc=nothingresponse.Redirect("change.asp")'如果用戶不存在,session("usern

8、ame")為空%>3、(change.asp 用戶信息修改頁面)<!- #include file="conn.asp" -><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>修改</title><style type="text/css"><!-body,td,th font-size:

9、 14px;-></style></head><center><body><br><%set rsc=server.createobject("adodb.recordset")sqlc="select * from info where username='"&session("username")&"' and password='"&session("password")

10、&"'"rsc.open sqlc,conn,1,1nr=rsc("password")username=rsc("username")password=rsc("password")sex=rsc("sex")qq=rsc("qq")mail=rsc("mail")add=rsc("add")personalinfo=rsc("personalinfo")vv=rsc("ntime&quo

11、t;)set rsc=nothingif nr="" thenresponse.Redirect("index.asp")end ifif strcomp(nr,request.Form("password")=0 thenresponse.Write("歡迎你!"&request.Form("username")response.Write("你是在"&vv&"注冊(cè)的")session("username")=

12、request.Form("username")end ifif session("username")="" thenresponse.Redirect("index.asp")end if%><form name="form1" method="post" action="change.asp?ac=ch"><table width="39%" height="105" border=&q

13、uot;0" ><tr><td width="27%" height="30">用戶名:</td><td width="73%" height="30"><input name="username" type="text" id="username" value="<%=username%>">*</td></tr><t

14、r><td height="30">密&nbsp; 碼:</td><td height="30"><input name="password" type="text" id="password" value="<%=password%>">*</td></tr><tr><td height="30">性&nbsp; 別:<

15、/td><td height="30"><input name="sex" type="text" id="sex" value="<%=sex%>"></td></tr><tr><td height="30">QQ:</td><td height="30"><input name="qq" type="te

16、xt" id="qq" value="<%=qq%>"></td></tr><tr><td height="30">Mail:</td><td height="30"><input name="mail" type="text" id="mail" value="<%=mail%>"></td><

17、/tr><tr><td height="30">地&nbsp; 址:</td><td height="30"><input name="add" type="text" id="add" value="<%=add%>"></td></tr><tr><td>介紹</td><td><textarea name=&qu

18、ot;personalinfo" cols="30" rows="6" id="personalinfo"><%=personalinfo%></textarea></td></tr><tr><td> </td><td><input type="submit" name="Submit" value="修改"><a href="chang

19、e.asp?se=y" target="_self">退出系統(tǒng)</a></td>&nbsp; <% if strcomp(request.QueryString("se"),"y")=0 thensession("username")=""&response.Redirect("index.asp") end if %></tr></table></form><%if

20、 strcomp(request.QueryString("ac"),"ch")=0 thenset rs=server.createobject("adodb.recordset")sql="select * from info where username='"&session("username")&"'"rs.open sql,conn,1,3rs("username")=request.Form("use

21、rname")rs("password")=request.Form("password")rs("mail")=request.Form("mail")rs("sex")=request.Form("sex")rs("qq")=request.Form("qq")rs("add")=request.Form("add")rs("personalinfo")=requ

22、est.Form("personalinfo")rs.updateset rs=nothingresponse.Write("修改完成!")end if%></body></center></html>4、(reg.asp 新用戶注冊(cè)頁面)<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>用戶注冊(cè)<

23、/title><style type="text/css"><!-body,td,th font-family: 宋體; font-size: 14px;-></style></head><body><center>用戶注冊(cè)<br><%=request.QueryString("msg")%><form name="form1" method="post" action="addnewdata.as

24、p?ac=adduser"><table width="39%" height="105" border="0" ><tr><td width="27%" height="30">用戶名:</td><td width="73%" height="30"><input name="username" type="text" id=&quo

25、t;username">*</td></tr><tr><td height="30">密碼:</td><td height="30"><input name="password" type="password" id="password">*</td></tr><tr><td height="30">確定密碼:</td>

26、;<td height="30"><input name="password2" type="password" id="password2">*</td></tr><tr><td height="30">性別:</td><td height="30"><input name="sex" type="text" id="sex

27、"></td></tr><tr><td height="30">QQ:</td><td height="30"><input name="qq" type="text" id="qq"></td></tr><tr><td height="30">Mail:</td><td height="30"

28、;><input name="mail" type="text" id="mail"></td></tr><tr><td height="30">地址:</td><td height="30"><input name="add" type="text" id="add"></td></tr><tr>&

29、lt;td>個(gè)人介紹</td><td><textarea name="personalinfo" cols="30" rows="6" id="personalinfo"></textarea></td></tr><tr><td> </td><td><input type="submit" name="Submit" value="提交

30、"></td></tr></table></form></center></body></html>5、(addnewdata.asp 新用戶注冊(cè)數(shù)據(jù)處理文件)<!- #include file="conn.asp" -><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><t

31、itle>成功</title></head><body><%ac=request.QueryString("ac")msg="注冊(cè)錯(cuò)誤信息"if request.Form("username")="" thenmsg=msg&"<br>"&"用戶名不能為空"end ifif strcomp(cstr(request.Form("password"),cstr(request.For

32、m("password2")<>0 thenmsg=msg&"<br>"&"兩次密碼輸入不同"end ifif len(request.Form("password")<6 thenmsg=msg&"<br>"&"密碼太簡單"end ifif strcomp(msg,"注冊(cè)錯(cuò)誤信息")>0 thenresponse.Redirect("reg.asp?msg=&quo

33、t;&msg)end ifif ac="adduser" thenset rsc=server.createobject("adodb.recordset")sql="select * from info where username='"&request.Form("username")&"'"rsc.open sql,conn,1,1ck=rsc("username")set rsc=nothingif ck<>"" thenmsg=msg&"<br>"&"用戶名被人注冊(cè)"response.Redirect("reg.asp?msg="&msg)end ifdsql="select * from info where id

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論