Programmatically develop search exposed filters I developed a custom module to list contents of custom tables. Now I want to have search filters much like exposed filter. My code is below

$items['recording'] = array(
    'title' =&gt; 'Recordings',
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('recordingcrud_sort_with_pager_content'),
    'access arguments' =&gt; array('access recordings'),
);

function recordingcrud_sort_with_pager_content($form, $form_state) {
global $user;
print_r($form_state);
if (!isset($form_state['storage']['recordingcrud']['search_criteria'])) {
  return render_table(); 
} else {
    print_r($_POST);
    $filters = $form_state['storage']['recordingcrud']['search_criteria'];
    return render_table($filters);
}


}

In render_table function I am rendering the listing. and calling the fom

 $search_form = drupal_get_form('recordingcrud_search_form');
$output = drupal_render($search_form);


My search form and submit handler code is:

function recordingcrud_search_form($form, &amp;$form_state) {
$form['search_term'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Search'),
    '#size' =&gt; 40,
    '#maxlength' =&gt; 120,
);
$form['submit'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; 'Apply',
  '#submit' =&gt; array('recordingcrud_search_form_submit'),
);



return $form;

    }

    function recordingcrud_search_form_submit($form, $form_state) {
        $form_state['storage']['recordingcrud']['search_criteria'] = $form_state['values'];
        $form_state['rebuild'] = TRUE;
    }


But this implementation I am getting the error 


  PHP Fatal error:  Unsupported operand types in
  /var/www/html/digitalFunctionalism/allprobail/includes/form.inc


What am I doing wrong?
I finally managed to do this with the following changes. 

I have changed the form method from post to get and then took the value of search term for url using $_GET 
Assigned action to the current page on which I am.

Changed the following code to

    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('recordingcrud_sort_with_pager_content'),


to 

'page callback' =&gt; 'recordingcrud_sort_with_pager_content',


and removed the second line.