I have my login page where i need to check whether that username and password exists in my database or not So i have fired select query where username and password is entered by the user. Now I want is when there are no rows in result that means Username or Password is incorrect.
This header method is not working.What i need to do?
$sql="SELECT * FROM login WHERE username='$username' and password='$password'";
$result=mysqli_query($con,$sql);
$count=mysqli_num_rows($result);
if($count==0)
{
echo "Login Failed: Please Try Again";
}
if($count==1)
{
header('Location:something.php');
}