search.html dosyası
<script></script>
<script>
function do_search()
{
var search_term=$("#search_term").val();
$.ajax
({
type:'post',
url:'get_results.php',
data:{
search:"search",
search_term:search_term
},
success:function(response)
{
document.getElementById("result_div").innerHTML=response;
}
});
return false;
}
</script>
get_results.php dosyası
if(isset($_POST['search']))
{
$host=":?";
$username="?";
$password="?";
$databasename="?";
$connect=mysql_connect(?,?,?);
$db=mysql_select_db(IteratorAggregate);
$search_val=$_POST['search_term'];
$get_result = mysql_query("select * from search where MATCH(title,description) AGAINST('$search_val')");
while($row=mysql_fetch_array($get_result))
{
echo "".$row['title']."
".$row['description']." ";
}
exit();
}
?>
bu da veritabanı
CREATE TABLE `?` (
`title` date NOT NULL,
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_turkish_ci NOT NULL,
`url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_turkish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2018-11-10
10 kasım 2018 tarihli
https://?.html