I know my logic here is going to be atrocious so bear with me. In essence, when a user fills out a form consisting of 3 entry boxes(representing 3 different columns in the database), I want to execute a search that takes keywords from the filled boxes and looks for all other user profiles (constituting of a first name, experience, dreams and profile picture) within the database table containing at least X% of the keywords from the initial user's input boxes.
I've decided to represent the keywords in an array since that is what I am most familar with in terms of element organization. Using this array as a reference, the search will scan the users table for any users whose profile information contain X% of the keywords in the reference array.
The array has already been prepared, but now I need guidance as to whether or not the manner in which I want to finish the task is appropriate/valid.
EDIT 1: Forgive me if I am unclear, let me try a more disjointed way of portraying the task.
- User fills out 3 unique textarea boxes.
- User saves inputted data, in which that data is stored in database (
userstable to be specific) - User goes to "Find Others" page
- User clicks on "Find" button
Query takes user information of the 3 textareas, filters them individually, then compresses them into a single array of keywords.
- Another query will search the entire database and display the profiles of other users whose profiles contain X% of words that match the keywords in the array.
- User sees the profiles of other users with similar words within the information of their profiles.
The array that will contain the keywords:
$compressed_array = array_merge($filtered1, $filtered2, $filtered3);