Foxtable(狐表)用户栏目专家坐堂 → 网页设计cookie问题


  共有2092人关注过本帖树形打印复制链接

主题:网页设计cookie问题

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106676 积分:542569 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/2/27 17:01:00 [显示全部帖子]

登录的时候是怎么保存cookie的?

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106676 积分:542569 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/2/28 20:07:00 [显示全部帖子]

贴出3楼代码所在事件的完整代码看看。

自己调试一下

Dim dr As DataRow=DataTables("报关员").sqlfind("手机号='" & e.postvalues("手机号") & "'")
    If dr IsNot Nothing Then  '''如果有此用户,那么继续判断.
        If dr("密码")=e.postvalues("密码") Then '''判断密码是否正确
msgbox(e.postvalues("手机号"))
msgbox(e.postvalues("密码"))
wb.AppendCookie("username",e.postvalues("手机号"), 43200)
wb.AppendCookie("password",e.postvalues("密码") ,43200)

------------

Dim e As RequestEventArgs = args(0)
Dim wb As New WeUI
msgbox(e.Cookies("username"))
msgbox(e.Cookies("password"))
Dim dr As DataRow=DataTables("报关员").sqlfind("手机号='" & e.Cookies("username")  & "'")

If dr IsNot Nothing  AndAlso  dr("密码")=e.Cookies("password")  Then  '''如果有此用户,且密码正确.    
   

 回到顶部