How to pass variable to a view after submitting?
I'm only assuming but I would imagine that the form is redirecting somewhere after your submit handler, that's why the result of example_page is not being displayed. Also I'm not sure if you're copying the code or written it on StackExchange but you're missing a return from your hook_menu

This is how you'd normally pass variables to pages:

function example_menu () {
  $items['example'] = array(
    'title' =&gt; 'Example',
    'page callback' =&gt; 'drupal_get_form',
    'page_arguments' =&gt; array('example_form'),
    'type' =&gt; MENU_CALLBACK
  );

  $items['example/page/%'] = array( // % means variable
    'title' =&gt; 'Example arg',
    'page callback' =&gt; 'example_page',
    'page_arguments' array(2), // 0 is example, 1 is page, 2 is the % variable
    'type' =&gt; MENU_NORMAL_ITEM,    
  );
  return $items;
}

function example_page($arg) {
  return '$arg is: ' . $arg;
}

function example_form($form,&amp;$form_state) {
  $form['name'] = array(
    '#type' =&gt; 'text',
    '#default_value' =&gt; t('Enter your name') 
  );
  return $form;
}

function example_form_submit($form,&amp;$form_state) {
  // No return from submit handler, but set redirect
  $form_state['redirect'] = 'example/page/' . $form_state['values']['name'];
}