$word variable is only getting searched on last word in string against db, whereas I need any and [mostly] every word in string searched, in any order. for example "hot water" gets match because 'water' is in db table, but 'water hot' is returning no results. thanks in advance for ideas.
$message = mysql_real_escape_string($message);
$message = strip_tags($message);
$name = trim($name);
$name = strip_tags($name);
$name = mysql_real_escape_string($name);
$pre_filter=trim($message);
$get_search=explode(" ",$pre_filter);
$post_message = stripslashes($post_message);
$name = $_POST['name'];
$post_name = ucfirst($name);
echo "Message: {$post_message}<p>";
$where = '';
$common = array('they', 'this', 'that', 'them', 'those', 'your',);
foreach ($get_search as $word)
{
$word = trim($word);