hi fellows, can someone help me with a little thing? I have installed an wordpress plugin but I have a bug and the author didn't replied to my email... Look here: http://www.tugasapo.com/index.php?page_id=5593&layout=search The bug is: If you try to search with keyword "Smallville", dont appear any results. But If you try to search with keyword "smallville", It gives you results, because the search only works with lower cases. Can someone help me fixing this? I dont understand php language, but the few that I understand, I think that the problem is in this code: file data.php code: if(!empty($_POST['rsfl_keyword'])) { if(isset($_POST['rsfl_search'])) { if(isset($_POST['rsfl_search'][0]) && isset($_POST['rsfl_search'][1])) { if(strpos(strtolower($element->name),$_POST['rsfl_keyword']) === FALSE && strpos(strtolower($element->description),$_POST['rsfl_keyword']) === FALSE) continue; } elseif($_POST['rsfl_search'][0] == 'name') { if(strpos(strtolower($element->name),$_POST['rsfl_keyword']) === FALSE) continue; } elseif($_POST['rsfl_search'][0] == 'description') { if(strpos(strtolower($element->description),$_POST['rsfl_keyword']) === FALSE) continue; } } else { if(strpos(strtolower($element->name),$_POST['rsfl_keyword']) === FALSE && strpos(strtolower($element->description),$_POST['rsfl_keyword']) === FALSE) continue; } } $files[] = $element; } Code (markup): What I have to change? Please help... my php knowledge is very very poor... Thank you
It works Thank you very much YoGem Btw, when I transformed the if(!empty($_POST['rsfl_keyword'])) to if(!empty(strtolower($_POST['rsfl_keyword']))) I got this error: Fatal error: Can't use function return value in write context in /home/sapo/public_html/wp-content/plugins/rsfiles/frontend/data.php on line 458 But I turn back to if(!empty($_POST['rsfl_keyword'])) and the error disappeared and the search is working fine. I can leave that code like that right? Best regards and thank you again
Well yes, I forgot to tell you not to touch the first line yep it will work! Edit: Anyway strtolower is a function that transform every string in lowercase.