I hope its allowed and i am not bothering here every 5 minutes with new questions but i need help at this .
I have this code , i got it from my last question before :
$string = $purifier->purify(@$_POST['string']);
$query = "SELECT * FROM users WHERE user_fname like '%".$string."%' OR user_lname like '%".$string."%' OR username like '%".$string."%' OR useremail like '%".$string."%'";
mysql_query("SET NAMES 'utf8'");
$result2 = mysql_query($query);
$num = mysql_num_rows($result2);
if($num == 1)
{
// return foreach with all results similar to the word thet write on the input.
}else
{
// return wrong . no reuslts found
}
This way working perfect with English words , when i using Hebrew words its not find nothing .
I did die to $string
,and the word was perfecly writed in hebrew and on utf8 , all my database using utf8_general_ci , all my pages have meta with utf8 encoding , all my site working perfect with hebrew .
But here with this code when i try to search like somthing in Database with hebrew words always says not found , when i try in english its found , any idea ?
Thanks a lot.