<?php
session_start();
$connect = mysqli_connect('localhost','root','root','register');
if (!$connect) {
echo "Ошибка подключения к базе данных.";
}
$login = $_POST['login'];
$password = $_POST['password'];
$check_user = mysqli_query($connect, "SELECT * FROM `users` WHERE `login` = '$login' AND `password` = '$password'");
echo mysqli_num_rows($check_user);