There are probably better ways, but If I had to achieve it with existing knowledge, I would do something like this:
$wordString = $_POST['search'];
/* first test there are comma separated values */
if (strpos($wordString, ",")){
/* split string into array of strings on the comma */
$words = explode(",", $wordString);
/* start the sql */
$sql = "SELECT * FROM table WHERE";
/* for each word update the query */
foreach($words as $word){
$sql.=" field LIKE '%$word%' OR";
}
/* remove trailing 'OR' from query */
$sql = substr($sql, 0, -3);
} else {
/* NO comma separated values, build normal query */
$sql = "SELECT * FROM table WHERE filed LIKE '%$wordString%'";
}
If the user enters 'one,two,three', the resulting query would be:
"SELECT * FROM table WHERE field LIKE '%one%' OR field LIKE '%two%' OR field LIKE '%three%'", otherwise a normal query is constructed.