Using Ajax, how can I populate a div with Database Content from a form select? This is what I have so far. I can populate the select field just fine, however when another option is selected I can not get the data to populate in the ajax callback div.

function product_comparison_menu(){
  $items = array();
  $items['design_product_comparison'] = array(
    'title'            =&gt; t('Product Comparison'),
    'menu_name' =&gt; 'menu-main-menu',
    'page callback'    =&gt; 'drupal_get_form',
    'access arguments' =&gt; array('access content'),
    'page arguments' =&gt; array('product_comparison_form'),
  );

  return $items;
}

/*
* Display output
*/
function product_comparison_form($form, &amp;$form_state) {

  //Query DB for Rows
$query = db_select('product_comparison');
$query-&gt;fields('product_comparison', array('id', 'OtherCombo',));
$query-&gt;condition('DropdownCategory', 'Exit Devices');
$query-&gt;orderBy('OtherCombo', 'ASC');
$results = $query-&gt;execute();

    //define rows
$options = array();
foreach ($results as $result) {
    $options[$result-&gt;id] = $result-&gt;OtherCombo;
}

$form['Exit Devices']['OtherCombo'] = array(
    '#type' =&gt; 'select',
    '#title' =&gt; t('Exit Devices'),
    '#options' =&gt; $options, 
    '#ajax' =&gt; array(
      'wrapper' =&gt; 'product_comparison_ajax_wrapper',
      'callback' =&gt; 'product_comparison_form_ajax'
    ),    
);

$form['results'] = array(
  '#type' =&gt; 'markup',
  '#prefix' =&gt; '&lt;div id="product_comparison_ajax_wrapper"&gt;',
  '#suffix' =&gt; '&lt;/div&gt;',
 );

 // If the form has been submitted, build up your results and display them
 if (isset($form_state['Exit Devices']['OtherCombo'])) {
   $row = db_select('product_comparison')
     -&gt;fields('product_comparison', array('DesignHardware', 'DesignImg','DesignURL'))
 -&gt;condition('OtherCombo', $form_state['Exit Devices']['OtherCombo'])
     -&gt;execute();

   $header = array();

   $form['results']['#markup'] = theme('table', array('header' =&gt; $header,'rows' =&gt; $rows));
  }
  else {
    $form['results']['#markup'] = '&lt;p&gt;The results will appear here when you change the dropdown option.&lt;/p&gt;';
  }

 return $form;
}

function product_comparison_form_ajax($form, $form_state) {
  return $form['results'];
}
You need to populate data in the ajax callback product_comparison_form_ajax and then return $form['results'].

Your code should be as the following:

Product comparison form

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

  //Query DB for Rows
  $query = db_select('product_comparison');
  $query-&gt;fields('product_comparison', array('id', 'OtherCombo',));
  $query-&gt;condition('DropdownCategory', 'Exit Devices');
  $query-&gt;orderBy('OtherCombo', 'ASC');
  $results = $query-&gt;execute();

  //define rows
  $options = array();
  foreach ($results as $result) {
    $options[$result-&gt;id] = $result-&gt;OtherCombo;
  }

  $form['Exit Devices']['OtherCombo'] = array(
    '#type' =&gt; 'select',
    '#title' =&gt; t('Exit Devices'),
    '#options' =&gt; $options, 
    '#ajax' =&gt; array(
      'wrapper' =&gt; 'product_comparison_ajax_wrapper',
      'callback' =&gt; 'product_comparison_form_ajax'
    ),    
  );

  // removed result condition

  $form['results'] = array(
    '#type' =&gt; 'markup',
    '#prefix' =&gt; '&lt;div id="product_comparison_ajax_wrapper"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;',
    '#markup' =&gt; '&lt;p&gt;The results will appear here when you change the dropdown option.&lt;/p&gt;',
  );

  return $form;
}


Product comparison ajax callback

function product_comparison_form_ajax(&amp;$form, &amp;$form_state) {
  if (isset($form_state['Exit Devices']['OtherCombo'])) {
    $row = db_select('product_comparison')
      -&gt;fields('product_comparison', array('DesignHardware', 'DesignImg','DesignURL'))
      -&gt;condition('OtherCombo', $form_state['Exit Devices']['OtherCombo'])
     -&gt;execute();

    $header = array(
      array('data' =&gt; 'Design Hardware'),
      array('data' =&gt; 'Design Img'),
      array('data' =&gt; 'Design URL'),
    );

    $rows = array();
    foreach ($result as $row) {
      $rows[] = array('data' =&gt; (array) $row);
    }

    // assign result to markup
    $form['results']['#markup'] = theme('table',array('header' =&gt; $header, 'rows' =&gt; $rows));

  }

  return $form['results'];
}