thinkphp3.2用户登录ajax提交验证

前端之家收集整理的这篇文章主要介绍了thinkphp3.2用户登录ajax提交验证前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

HTML代码

注册登录 required required Box" 记住用户名 忘记密码 退出

js代码

PHP代码

=['username'=['pwd'(=='' || ==''->ajaxReturn(('status'=>0,'info'=>'帐号密码不能为空','url'=>'' = D("User"=->getFields("account='".."' and password='".()."'"((->ajaxReturn(('status'=>0,'info'=>'登录失败','url'=>'''account',['account'=U('index/index'->ajaxReturn(('status'=>1,'info'=>'登录成功','url'=></span><span style="color: #0000ff;"&gt;public</span> <span style="color: #0000ff;"&gt;function</span><span style="color: #000000;"&gt; loginout(){ session(</span>'account',<span style="color: #0000ff;"&gt;null</span><span style="color: #000000;"&gt;); </span><span style="color: #800080;"&gt;$this</span>->redirect('index/index'<span style="color: #000000;"&gt;); }</span></pre>

model代码

getFields( ->where()->

 

原文链接:https://www.f2er.com/thinkphp/403067.html

猜你在找的ThinkPHP相关文章