In the script, after you clean/slash the form variables, edit the query so it has something like the following in it:
Code:
SELECT var1,var2,var3 FROM table WHERE var1 LIKE '%$var1%' OR var2 LIKE '%$var2%' OR var3 LIKE '%$var3%'
Then in the mysql_fetch_array part of the code, edit it for the new variables. There are some examples
here.