How to print the search results after form_submit, in a custom search module?
I used an if statement in the form to check if submit is pressed and gave the results in the if block. 

function hook_form($form, &amp;$form_state) {
if (!empty($form_state['values']['text'])) {//here i am checking if the text field is empty
    $header=array('one'=&gt;t('one'),'two'=&gt;t('two'));//your header
 $query=db_query();//query
$column_name = $query-&gt;execute()-&gt;fetchAssoc();//fetchAssoc to get results in an associative array.
//here get the fields from $column name into rows
$row = array( 
    array(
    'one'=&gt;$column_name[""],
    'two' =&gt; $column_name[""],
    );
//your form elements after submit is pressed.  
 $form['table']=array(
 '#theme'=&gt;'table',
 '#header'=&gt;$header,
 '#rows'=&gt;$row,
 );

}
else {
//your original form here.
 $form['text'] = array(
'#type' =&gt; 'textfield'
 );
$form['buttons']['submit'] = array(
'#type' =&gt; 'submit',
'#value' =&gt; t('Submit Button'),

);
  }
 return $form;
}


in you form submit add this 

$form_state['rebuild']=true;