drupal form submission I have a very weird problem, my custom forms submition doesn't work unless devel module is active.
any ideas how to solve this problem?

function forexCompare_form_submit($form,&amp;$form_state){

$array = unserialize(variable_get('forexCompare_company1',""));

$array[] = t($_POST['forexCompare_company1']);
variable_set('forexCompare_company1',serialize($array));
//drupal_set_message(print_r($form_state)." k".$_POST['forexCompare_company1']);
}

function forexCompare_form($form,&amp;$form_state){
return array(
            'forexCompare_company1' =&gt; array(
                '#type' =&gt; 'select',
                '#title' =&gt; 'Company #1',
                '#options' =&gt; getCompanies()
            ),
            'forexCompare_company2' =&gt; array(
                '#type' =&gt; 'select',
                '#title' =&gt; 'Company #2',
                '#options' =&gt; get_stored_comp()
            ),
            'submit' =&gt; array(
                '#type' =&gt; 'submit',
                '#value' =&gt; 'Save',
            ),
            '#submit' =&gt; array(
               'forexCompare_form_submit'
            )

);
}


i have notice that when i return the drupal_get_form() on the page callback , but when i pass it as variable in theme function doesnt work

function userOptions_theme(){
global $user;
$user_loaded = user_load($user-&gt;uid);
return array(
  'settings_user_transfer'=&gt;array(
      'template' =&gt; 'setting',
      'variables' =&gt; array('money' =&gt; $user_loaded,'form' =&gt; drupal_get_form('userOptions_form'))
  )
);
}
There are a few things wrong with your approach, don't use $_POST, the values are there in &amp;$form_state and you will break Drupal form handling using $_POST. If you have devel running use dpm() to explore that array. 

In the theme function call drupal_get_form with the right name: forexCompare_form, i.e. 
drupal_get_form('forexCompare_form'). Or was the theme function just an example.