本文实例讲述了PHP实现登录,注册及密码修改功能的方法。分享给大家供大家参考,具体如下:
这里介绍注册,登录,修改密码的界面布局与功能实现:
1.登录
2.忘记密码
3.免费注册
页面布局:
<div id="views" class="views"> <div id="view-login" class="page-view view-login active"> <present name="wxuser"> <div id="wxuser" class="form-group text-center"> <div> <img src="{sh:$wxuser.headimgurl}"> </div> <h4 class="nickname">{sh:$wxuser.nickname}</h4> </div> </present> <!--登录--> <div id="login" class="step"> <h4 class="popup-title login">登录</h4> <div class="go-forget">忘记密码</div> <form class="form-horizontal" role="form" type="get"> <div class="form-group"> <label>手机号码</label> <input type="tel" name="tel" class="form-item" id="tel_num" placeholder="请输入手机号码" value=""> </div> <div class="form-group"> <label>登录密码</label> <input type="password" name="password" class="form-item" placeholder="请填写密码"> </div> <div class="js-help-info error"></div> </form> <div class="popup-options"> <button type="button" class="btn btn-block btn-success js-login">确认</button> </div> <div class="go-register">免费注册</div> </div> <!--注册--> <div id="register" class="step" style="display:none;"> <h4 class="popup-title">注册账号</h4> <form role="form" class="form-horizontal"> <div class="form-group"> <label>手机号码</label> <input type="tel" name="tel" class="form-item" id="tel_num" placeholder="请输入手机号码" value=""> </div> <div class="form-group form-group-r"> <label>验证码</label> <button class="btn-sm btn-white js-sms-code" type="button">获取验证码</button> <input type="text" placeholder="请填写验证码" class="form-item" name="smscode" /> </div> <div class="form-group"> <label>登录密码</label> <input type="password" placeholder="设置登录密码" class="form-item" name="password" maxlength="30"> </div> <div class="form-group"> <label>确认密码</label> <input type="password" placeholder="确认登录密码" class="form-item" name="re_password" maxlength="30"> </div> <div class="js-help-info error"> </div> </form> <div class="popup-options"> <button type="button" class="btn btn-block btn-success js-register">确认</button> </div> <div class="go-login">立即登录</div> </div> <!--修改密码--> <div id="changePwd" class="step" style="display:none;"> <h4 class="popup-title">修改密码</h4> <form role="form" class="form-horizontal"> <div class="form-group"> <label>手机号码</label> <input type="tel" name="tel" class="form-item" id="tel_num" placeholder="请输入手机号码" value=""> </div> <div class="form-group form-group-r"> <label>验证码</label> <button class="btn-sm btn-white js-sms-excode" type="button">获取验证码</button> <input type="text" placeholder="请填写验证码" class="form-item" name="smscode" /> </div> <div class="form-group"> <label>新密码</label> <input type="password" placeholder="设置登录密码" class="form-item" name="password" maxlength="30"> </div> <div class="form-group"> <label>确认密码</label> <input type="password" placeholder="确认登录密码" class="form-item" name="re_password" maxlength="30"> </div> <div class="js-help-info error"> </div> </form> <div class="popup-options"> <button type="button" class="btn btn-block btn-success js-changePwd">确认</button> </div> <div class="go-login">立即登录</div> </div> </div></div>
新闻热点
疑难解答