0
I am using the query below to perform the login,it was working normal with normal passwords,more now I am migrating to the password Md5,only this giving only invalid password,I believe it is my select that is with error "SELECT * FROM usuarios WHERE usu_login = '".$login."' and usu_senha = 'MD5(".$senha.")'";
But I can’t see what could be ?
include("conn_user.php");
$login= $_POST["login"];
$senha =$_POST["senha"];
$usuarios = "SELECT * FROM usuarios WHERE usu_login = '". $login." ' and usu_password = '". MD5($password)." '"; $result_users = mysql_query($users,$conn_user); $u = mysql_fetch_object($result_users); if(mysql_num_rows($result_users) == 1 ){
$v_nome = $u->usu_nome;
$v_senha = $u->usu_senha;
echo"$v_nome";
echo"$v_senha";
}
In the bank is the password registered so:
2171d30f75d516c10c2f
Already in consultation what is going through this bigger:
2171d30f75d516c10c2f4c79dd270542
Still giving error, stranger was that, as I edited it in the question,no select the password ta bigger than in the bank. in the bank this way: 2171d30f75d516c10c2f more in the query ta so: 2171d30f75d516c10c2f4c79dd270542 what could be.
– Chefe Druida
what is the configuration of your field that stores the password? is varchar how much ? Put the error that you are giving in my query,
– Jasar Orion
was that,vlw,the password field is with varchar(20) so not making all md5.
– Chefe Druida
rssss q good q helped
– Jasar Orion
Thanks again.
– Chefe Druida