I think I know what's wrong. I was assuming that you were using the actual DB field names for the names of the fields in the form (because -- why not?).
You could change them in the form and in the $options array to match the db field names, but if you need them to be different, The $options array would be:
$options array(
'nameused in $_POST' => 'nameused in DB',
//etc.
);
And the foreach code would be:
$search = array();
foreach ($options as $postName => $dbName) {
$val = $modx->getOption($postName, $_POST, '');
if (!empty($val)) {
$search[$dbName] = '1';
}
}
Another possible issue:
What is the actual value of the field in the database when the user has the value? I assume 1 vs. 0, but if it's 'x' that could be the problem.