最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp登录保存数据到cookie
时间:2022-07-02 23:11:09 编辑:袖梨 来源:一聚教程网
这里是根据用户的选择是否允许把用户名密码保存到cookie里面哦,我们特别注意那代码蓝色的代码哦。
set rs=server.createobject("adodb.recordset")
exec="select * from yrwl_tb_admin where yhm='"&yhm&"'"
rs.open exec,conn,1,1
if not rs.eof then
if setpwd(pass) <> rs("pass") then
dl = "0"
else
cs = rs("cs")
if isnull(cs) then cs = 0
cs = cs + 1
zhsj = rs("zhsj")
if isnull(zhsj) then zhsj = "第一次登陆"
session(sessionvalue&"zhsj") = zhsj
if jy="1" then
Response.cookies("bbsyhm") = yhm
Response.cookies("bbspass") = pass
else
Response.cookies("bbsyhm") = ""
Response.cookies("bbspass") = ""
end if
session(sessionvalue&"pass")=pass
session(sessionvalue&"yhm") = yhm
session(sessionvalue&"lxfs") = rs("lxfs")
session(sessionvalue&"sp") = rs("wz")
session(sessionvalue&"id") = cstr(rs("id"))
session(sessionvalue&"jb") = rs("jb")
session(sessionvalue&"qm") = rs("qm")
exec1 = "update yrwl_tb_admin set cs = "+cstr(cs)+",zhsj = '"+jdsj+"' where yhm = '"+yhm+"'"
conn.execute exec1
exec1 = "insert into yrwl_tb_dlxx (yhm,sj,ck) values ('"&yhm&"','"&jdsj&"','贴吧')"
conn.execute exec1
if cz = "index" then response.redirect "index.asp"
end if
else
dl = "0"
end if
if dl = "0" then%>
<%else
rs.close
conn.close%>
<%end if
相关文章
- 武神主宰手游公测时间揭晓 武神主宰手游正式开服日期公布 06-06
- 白银之城内测时间公布 白银之城内测开启日期及参与方式详解 06-06
- icity我的日记如何开启专注模式 06-06
- 今花生app如何搜索商品 06-06
- 咔皮记账如何设置预算 06-06
- 竹马法考如何设置题库 06-06