От: ПРОГРАМИСТИ :ПОМОЩ ?
<?php
$connect = mysqli_connect("localhost","root","muarem1");
mysqli_select_db($connect,"my_db");
if(isset($_GET['search'])){
$search_value = $_GET['value'];
$query = "SELECT * FROM `my_db`.`sites` WHERE `site_keywords` LIKE '%$search_value%'";
$try = mysqli_query($connect,$query);
if ( mysqli_num_rows($try) <= 0) { echo "<br><center>Sorry, no results found for <b>$search_value</b>. Try different search or check back again later. </center></br> ";}
else {
while($row = mysqli_fetch_array($try))
{
$title = $row['site_title'];
$link = $row['site_link'];
$desc = $row['site_desc'];
echo "<h1>$title</h1><a href='$link'>$link</a><p>$desc</p>";
}
}
}
?>
нов проблем
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in D:\Users\muarem\mywebsite\test.php on line 22