Keyword search into database from search box

I want one help in my project. There is a search box in my project and what the user has typed a sentence or random keywords into the search box. Breakdown the sentence into the keywords and store it into the array and then find the correct row from the Mysql or database according to the maximum keywords match by a particular row of the database fetch that row and display that data into a webpage.

I have seen some of the tools and open-source projects but they lots of the code but, can we do this thing in a simple way instead of using any tool or open-source code. I am using PHP for Backend and Mysql (Xampp) for the database.