I have a very simple search facility that looks for keywords in a large text field of data, for example, a description of an object or user.
I would like to fuzz it up a bit, but haven't got the foggiest how to do this.
I have text box ($search), with a submit button.
At the moment, my code is:
trimmed = trim($search);
$result = mysql_query("select * from user_table where UserDescription like \"%$trimmed%\" ");
I have read about the ereg and eregi functions, but i don't know how to incorporate them into the above code.
Any help is appreciated.