You'll have to pass a string to the MATCH AGAINST
function.
Also, to make sure the post contains every words, like "LIKE" you'll have to add "+" sign at the beginning of the required words.
$search = $_POST['search'];
$search = trim($search);
$search = preg_replace('/\s+/', ' ', $kerko);
$keywords = explode(" ", $kerko); // create array of keywords
// here we build the string to require all keywords
$keywds_str = "+" . implode(" +", $keywords);
And then the SQL query :
$sql = $conn->prepare("SELECT * FROM weblinks WHERE MATCH(post) AGAINST ('".$keywds_str."')");
please note the string concatenation too. In your example, the query had to look for "$keywords" literally.
Last point, enable php error reporting to know what's wrong in your code. A blank page will not help you much.
Hope it helps and good luck.
EDIT :
Since the error message :
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error:
1191 Can't find FULLTEXT index matching the column list' in C:\xampp\htdocs\scraping\result.php:82
Stack trace: #0 C:\xampp\htdocs\scraping\result.php(82): PDOStatement->execute() #1 {main}
thrown in C:\xampp\htdocs\scraping\result.php on line 82
You'll have to index the table column by FULLTEXT
and enable the KEYS
on that table too :
ALTER TABLE weblinks ENABLE KEYS;
ALTER TABLE weblinks ADD FULLTEXT(post);