<form method="post" action="#">
<input type="text" name="search">
<input type="submit">
</form>
<?php
include('conn/conn.php');
$search=$_REQUEST['search'];
$sql="select * from info";
$r= mysqli_query($conn, $sql);
while($row=mysqli_fetch_array($r,MYSQLI_ASSOC)){
$title=$row['title'];
$content=$row['content'];
$d= strstr($content, $search);
if($d){
echo "<p><a href=\"news/$title.pdf\">$title</a></p>";
echo str_ireplace($search,"<font color='#FF0000'>".$search."</font>",$content);
}
}
?>