<div class="row cl">
<label class="form-label col-xs-3"><i class="Hui-iconfont"></i></label>
<div class="formControls col-xs-8">
<input id="" name="password" type="password" placeholder="密码" class="input-text size-L">
</div>
</div>
<div class="row cl">
<div class="formControls col-xs-8 col-xs-offset-3">
<input name="verify" class="input-text size-L" type="text" placeholder="验证码" onblur="if(this.value==''){this.value=''}" onclick="if(this.value==''){this.value='';}" style="width:150px;">
<img id="verify_img" src="{:captcha_src()}">
<a id="kanbuq" onclick="getPic();" >看不清,换一张</a>
</div>
</div>
<div class="row cl">
<div class="formControls col-xs-8 col-xs-offset-3">
<label for="online">
<input type="checkbox" name="online" id="online" value="">
使我保持登录状态</label>
</div>
</div>
<div class="row cl">
<div class="formControls col-xs-8 col-xs-offset-3">
<input name="" id="login" type="button" class="btn btn-success radius size-L" value=" 登 录 ">
</div>
</div>
</form>
</div>
</div>
<div class="footer">wo zi ji shuo de </div>
<script type="text/javascript" src="__STATIC__/lib/jquery/1.9.1/jquery.min.js"></script>
<script type ="text/javascript" src="__STATIC__/static/h-ui/js/H-ui.js"></script>
<!-- AJAX submission script-->
<script>
$(function(){
//Add a click event to the login button
$('#login').click(function () {
$.ajax({
Type: 'Post',
URL: '{: url ("Checklogin")}',
Data: $ ('Form'). Serialize (),
Datatype: 'json',
SUCCESS: Function (data) {// Only when the results are returned to one, you can handle
if (data.status == 1) {
Alert (data.message);
Window.load. href = "{:url('index/index')}"; )
})
})
</script>
class user extends Base
{
//Login interface
public function login()
{
Return $this-> view ->fetch();
}
//Verify login $this ->validate($data,$rule,$msq)
public function checklogin(Request $request)
{
//Chef return value
$status = 0;
$result =
'name | Username' = & GT; 'Require', // The user name must fill in
"Password | Password" = & GT Code '= & gt;' Require | CAPTCHA ', // Username must fill in
];
// Verification
$ result = $ this -& gt; value ($ data, $ rule);
// If the verification passes
if ($ Result === TRUE) {
// Construction query conditions
$ Map = [
'name' = & gt; $data['name'],
"password" => md5($data["password"]),
" " $user =UserModel::get($map);
if($user == null){
$result = 'The user was not found';
;
$result = 'Verification passed, click [OK] to enter';
'=>$result,'data'=>$data];
}
The database does not have that field. Can you see if the database matches your field?