首先你要判断用户密码是否正确,那么你数据表中的用户必须要设置是唯一;当用户登陆的时候你只有要用到users表查找用户跟密码相当就可以了。 sql语句=select count(*)from users where username='用户名' and password='密码' 写个int类型的变量...