There is a database, id | ip | text | I make a request:
$sql = mysql_query("SELECT `Ippred`, `Text` FROM `pred` WHERE `Ippred` like '%".$ip."%'"); $result = mysql_fetch_array($sql); if ($result > 0){ echo '<div style="color:black;width:50%;">'; echo 'Ваш IP адрес был найден в базе' ; echo '</div>'; I tried to implement through like, anyway it only displays there will be a complete match, and I need to, if the user comes under ip, for example, 178.71.137.107, then if the database has ip 178.71. , he deduced that ip was found