search

Home  >  Q&A  >  body text

If the password is entered incorrectly, the account is correct, or the account is shown as not being there, what should I write in the rules?

When the password is entered incorrectly, a password error will be displayed instead of not having the account

浮梦浮梦2681 days ago1514

reply all(2)I'll reply

  • 按键盘手指磨破皮

    按键盘手指磨破皮2017-09-09 00:13:38

    简单的写下吧 其他的自己改改
    $name = $_POST[$name]; //账号
    $psw  = $_POST[$psw]; //密码
    if(!isset($name) || !isset($psw)){
    	echo "请输入账号和密码";
    }else{
    	//连接数据库进行账号查询,返回结果假设为$name;
    	if(!$name){
    		echo '账号不正确';
    	}else
    	{
    		//连接数据库进行密码查询,返回结果假设为$psw;
    		if(!$psw){
    			echo '密码不正确';
    		}else
    		{
    			echo '登陆成功';
    		}
    	}
    	
    }


    reply
    0
  • IT-小爬虫

    IT-小爬虫2017-09-08 14:55:31

    First determine whether the account exists, and then determine whether the password is correct based on the existing user.
    My rough opinion.

    reply
    0
  • Cancelreply