<?php
$connection = new mysqli("localhost","root","","web") or exit("False");
if(isset($_POST['check'])){
$login = $_POST['login'];
$password = $_POST['password'];
$query = mysqli_query($connection,"SELECT * FROM `usersreal` WHERE `login` = '$login' AND `password` = '$password'");}
if(mysqli_num_rows($query) == 0){
mysqli_fetch_assoc($query);
echo"Введите верные данные";
}
else{
echo"Вы успешно вошли";
}
?>