Form returning value issue I am trying to adapt a Drupal 5 form to a Drupal 7 form, but something is not working. The form is correctly displayed, but when "Submit" button is clicked the information in the form is not correctly send to $_GET. What am I missing??

&lt;?php 
 function my_menu($may_cache) {
  $items = array();
    $items['admin/reporting/report_details'] = array(
    'title' =&gt; 'Report: User details by stores',
    'access arguments' =&gt; array('access content'),
    'page callback' =&gt; 'say_report_details',
    'type' =&gt; MENU_CALLBACK,);  

 return $items;
}

function say_report_details($values = array()) {
  $form = drupal_get_form("report_details_form");
  //$output = theme("report_page", $form, $output);
  return $form;
}


function report_details_form() {
 $form["search"] = array(
 '#type' =&gt; 'fieldset',
 '#title' =&gt; t('Search params'),
 '#collapsible' =&gt; FALSE,
 '#tree' =&gt; TRUE,
 );

 for ($i = 1; $i &lt; 32; $i++) {
  $days_opt[$i] = $i;
 }
 for ($i = 1; $i &lt; 13; $i++) {
  $month_opt[$i] = $i;
 }
 for ($i = 2008; $i &lt; date("Y") + 3; $i++) {
  $year_opt[$i] = $i;
 }

 $form["search"]["from_day"] = array(
  '#type' =&gt; 'select',
  '#title' =&gt; 'Date from',
  '#options' =&gt; $days_opt,
  '#default_value' =&gt; (($_GET['from_day'] == "") ? date("d") : $_GET['from_day'])
 );
 $form["search"]["from_month"] = array(
  '#type' =&gt; 'select',
  '#title' =&gt; '&amp;nbsp;',
  '#options' =&gt; $month_opt,
  '#default_value' =&gt; (($_GET['from_month'] == "") ? date("m") : $_GET['from_month'])
 );
 $form["search"]["from_year"] = array(
  '#type' =&gt; 'select',
  '#title' =&gt; '&amp;nbsp;',
  '#options' =&gt; $year_opt,
  '#default_value' =&gt; (($_GET['from_year'] == "") ? date("Y") : $_GET['from_year'])
 );

 $form["search"]["to_day"] = array(
  '#type' =&gt; 'select',
  '#title' =&gt; 'Date to',
  '#options' =&gt; $days_opt,
  '#default_value' =&gt; (($_GET['to_day'] == "") ? date("d") : $_GET['to_day'])
 );
 $form["search"]["to_month"] = array(
  '#type' =&gt; 'select',
  '#title' =&gt; '&amp;nbsp;',
  '#options' =&gt; $month_opt,
  '#default_value' =&gt; (($_GET['to_month'] == "") ? date("m") : $_GET['to_month'])
 );
 $form["search"]["to_year"] = array(
  '#type' =&gt; 'select',
  '#title' =&gt; '&amp;nbsp;',
  '#options' =&gt; $year_opt,
  '#default_value' =&gt; (($_GET['to_year'] == "") ? date("Y") : $_GET['to_year'])
 );

 $result = db_query('SELECT something in the database');

 $strs = array("all" =&gt; "All");

 foreach ($result as $store) {
   $strs[$store-&gt;tid] = $store-&gt;name;
 }

 $form["search"]["store"] = array(
  '#type' =&gt; 'select',
  '#title' =&gt; 'Stores',
  '#options' =&gt; $strs,
  '#default_value' =&gt; $_GET['store']
 );

 $form["submit"] = array("#type" =&gt; "submit", "#value" =&gt; "Show report");

 return $form;
}

function report_details_form_submit($form_id, $form_values) {
  $query = "";
// This next line is the one I am having an issue with right now.$form_values is empty
  foreach ($form_values['search'] as $key =&gt; $value) {
     $query .= "&amp;". $key ."=". $value;
  }

 return array('admin/reporting/report_details', $query);
}


The code throws an error at last "foreach" as $form_values is empty for some reason.Thank you!!
By default Drupal form sends values using post method. If you are looking to recieve values in $_GET you will have to define #method attribute of your form to get.

$form['#method'] = 'get';