So i'm trying to get the number (or just when the user is found a 1 pops up)of the user im logging into as from the input fields which i have made in phpmyadmin. When i enter something completely random i get 0 as the randomly entered letters arent in my database so it isnt found in the database, however when i enter the actual login and password from one of the users i get 0 instead of 1 which would mean that that user was found from the database. im not sure if i can link the database but here it is: http://localhost/phpmyadmin/sql.php?db=mysqldb1&table=users&token=dbc781132ba546cedab4644522745917&pos=0 here are the codes: here is login.html
<html>
<head>
<title> MYSQL </title>
<script
src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous">
</script>
</head>
<body>
<div id="status"></div>
<input id="login" placeholder="Login"><br>
<input type="password" id="pass" placeholder="Password" ><br>
<button id="entry"> Login </button>
<script>
$("#entry").click(function(){
$.post("check.php", {login: $("#login").val(), password: $("#pass").val()},
function(result){
$("#status").html(result);
})
})
</script>
</body>
</html>
here is the php code
<?php
$login=$_POST['login'];
$password=$_POST['password'];
echo $login.$password;
require "config/con1.php";
$sql= "SELECT id FROM users WHERE login='$login' AND password='$password' ";
$result=mysqli_query($con, $sql);
$value = mysqli_num_rows($result);
echo $value;
?>