if (!isset($search_params['match_mode'])) $search_params['match_mode'] = $_REQUEST['match_mode'];
switch ($search_params['match_mode']) {
case 'whole':
case 'smart':
case 'any':
break;
default:
$search_params['match_mode'] = 'smart';
}
Your code does look v neat, thanks for sharing. :Thmbsup:
I have a question, thou:
What if
$_REQUEST['match_mode'] isn't set (undefined index) before usage? Doesn't it generate a warning in forum log?
if (!isset($search_params['match_mode'])) $search_params['match_mode'] = $_REQUEST['match_mode'];
I'm so happy it's working for you TjaMe! :Thmbsup:
Care to post us the url to your forum here? :)