ASP用戶登錄注冊代碼

上傳人:hao****021 文檔編號:121632192 上傳時(shí)間:2022-07-19 格式:DOC 頁數(shù):10 大小:25.01KB
收藏 版權(quán)申訴 舉報(bào) 下載
ASP用戶登錄注冊代碼_第1頁
第1頁 / 共10頁
ASP用戶登錄注冊代碼_第2頁
第2頁 / 共10頁
ASP用戶登錄注冊代碼_第3頁
第3頁 / 共10頁

下載文檔到電腦,查找使用更方便

9.9 積分

下載資源

還剩頁未讀,繼續(xù)閱讀

資源描述:

《ASP用戶登錄注冊代碼》由會員分享,可在線閱讀,更多相關(guān)《ASP用戶登錄注冊代碼(10頁珍藏版)》請?jiān)谘b配圖網(wǎng)上搜索。

1、ASP用戶登錄注冊代碼 1,(index.asp 用戶登陸頁面) 會員

2、

會員注冊系統(tǒng)

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

5、password")&"'" 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 用戶信息修改頁面)

6、eta http-equiv="Content-Type" content="text/html; charset=gb2312"> 修改


<% set rsc=server.createobject("adodb.recordset") sqlc="select * from info where username='"&sess

7、ion("username")&"' and password='"&session("password")&"'" rsc.open sqlc,conn,1,1 nr=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") set rsc=nothing if nr="" the

8、n response.Redirect("index.asp") end if if strcomp(nr,request.Form("password"))=0 then response.Write("歡迎你!"&request.Form("username")) response.Write("你是在"&vv&"注冊的") session("username")=request.Form("username") end if if session("username")="" then response.Redirect("index.asp") end if %>

9、

用戶名:
密 碼:

3、put name="password" type="password" id="password" size="15">

注冊

12、

<% if strcomp(request.QueryString("se"),"y")=0 then sessio

13、n("username")="" response.Redirect("index.asp") end if %>

用戶名: *
密 碼:

10、>

*
性 別:
QQ:
Mail:
地 址:
介紹
退出系統(tǒng)
<% if strcomp(request.QueryString("ac"),"ch")=0 then set rs=server.createobject("adodb.recordset") sql="select * from info where username='"&session("username")&"'" rs.open sql,conn,1,3 rs("username")=reques

14、t.Form("username") 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")=request.Form("personalinfo") rs.update set rs=nothing response.Write("修改完成!") end if %>

15、body>

4,(reg.asp 新用戶注冊頁面) 用戶注冊
用戶注冊
<% =re

16、quest.QueryString("msg") %>

用戶名: *

17、t="30">密碼:

*
確定密碼: *
性別:
QQ:
Mail:
地址:

19、="text" id="add">

個(gè)人介紹
5,(addnewdata.asp 新用

20、戶注冊數(shù)據(jù)處理文件) 成功 <% ac=request.QueryString("ac") msg="注冊錯(cuò)誤信息" if request.Form("username")="" then msg=msg&"
"&"用戶名不能為空" end if if strcomp(c

21、str(request.Form("password")),cstr(request.Form("password2")))<>0 then msg=msg&"
"&"兩次密碼輸入不同" end if if len(request.Form("password"))<6 then msg=msg&"
"&"密碼太簡單" end if if strcomp(msg,"注冊錯(cuò)誤信息")>0 then response.Redirect("reg.asp?msg="&msg) end if if ac="adduser" then set rsc=server

22、.createobject("adodb.recordset") sql="select * from info where username='"&request.Form("username")&"'" rsc.open sql,conn,1,1 ck=rsc("username") set rsc=nothing if ck<>"" then msg=msg&"
"&"用戶名被人注冊" response.Redirect("reg.asp?msg="&msg) end if dsql="select * from info where id is null" s

23、et rs=server.createobject("adodb.recordset") rs.open dsql,conn,1,3 rs.addnew rs("username")=request.Form("username") 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("personalin

24、fo")=request.Form("personalinfo") rs("ntime")=now rs.update set rs=nothing %>

注冊成功,點(diǎn)擊登陸
<% end if %> 6,(conn.asp 數(shù)據(jù)庫連接文件) <% '連接數(shù)據(jù)庫開始 dim conn,rs,sql on error resume next dbpath=server.mappath("userinfo.mdb

25、") set conn=server.createobject("adodb.connection") conn.open "PROVIDER=Microsoft.jet.OLEDB.4.0;data source="&dbpath '創(chuàng)建記錄對象 set rs=server.createobject("adodb.recordset") %> 7,(userinfo.mdb ACCESS 數(shù)據(jù)庫) 在ACCESS中建一個(gè)表,然后在這個(gè)表中建立字段名稱 表名:info 字段名稱 數(shù)據(jù)類型 id 自動(dòng)編號 username 文本 password 文本 sex 文本 quest 文本 qq 文本 mail 文本 personalinfo 文本 ntime 文本 ?

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

相關(guān)資源

更多
正為您匹配相似的精品文檔
關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號:ICP2024067431-1 川公網(wǎng)安備51140202000466號


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng),我們立即給予刪除!