Select in mysql table with password from form not work
Posted: 12 Feb 2017, 20:00
hello,
i have a problem with this code:
when i run this code, it dont return any query, so users dont redirect("myskils.php")
it display this message "your name or your password in incorrect"!!!
thank you for your help
i have a problem with this code:
Code: Select all
if(isset($_POST['submit_login']))
{
$txt_login= mysqli_real_escape_string($con,$_POST['txtlogin']);
$txt_pass= mysqli_real_escape_string($con,$_POST['txtpass']);
if(empty($txt_login) || empty($txt_pass))
{
$err=true;
$message="please enter information";
} else {
$hashed_password= hash('ripemd160', $txt_pass);
$sql="SELECT user_ID FROM tbl_users WHERE user_login='$txt_login' AND user_password= '$hashed_password' AND status= 'sent' AND active= '1'";
$result=mysqli_query($con,$sql);
if(mysqli_num_rows($result)===1){
$_SESSION['user_login']=$txt_login;
redirect("myskils.php");
}else
{
$err=true;
$message="your name or your password in incorrect";
echo $hashed_password;
}
}
}
it display this message "your name or your password in incorrect"!!!
thank you for your help