0
I am making a login system. In the table is registered a user "User01", when the customer will log in if he puts it in the field "user01" I want it to be valid anyway.
Here’s the code I’m using.
$Name = mysqli_real_escape_string($conn, $_POST['Name']);
$Pass = mysqli_real_escape_string($conn, $_POST['Pass']);
$PassMD5 = md5($Pass);
$result1 = "SELECT * FROM users WHERE username = '$Name' && userpass = '$PassMD5' LIMIT 1";
$result2 = mysqli_query($conn, $result1);
$result3 = mysqli_fetch_assoc($result2);
if(isset($result3)){
echo "SUCCESS";
}else{
echo "FAIL";
}
Which bank is yours?
– novic
You are tagged, Mysql.
– Renato Junior
Mariadb(mysql), version PHP 7.1
– João