How to display form submitted values without storing in database I am new to Drupal. I couldn't figure out how to display the values submitted in a form on a new page without storing in a database.
I found a video on how to retrieve data submitted through a form and stored in a database, but, for my site I wouldn't need to store data. The data will get some simple mathematical processing and then the result will be displayed on another page. Here is the code I have.

&lt;?php
/**
 * Implements hook_permission().
*/
function form_price_permission() {
return array(
'submit form_price' =&gt; array(
  'title' =&gt; t('Submit form_price'),
  'description' =&gt; t('Submit the form_price form'),
  ),
);
}
/**
* Implements hook_menu().
*/
function form_price_menu() {
$items = array();
$items['form-price'] = array(
  'title' =&gt; 'Form to calculate price',
      'page callback' =&gt; 'drupal_get_form',
  'page arguments' =&gt; array('form_price_form'),
  'access arguments' =&gt; array('submit form_price'),
);
return $items;
}
/**
 * form implementation
*/
function form_price_form($form,&amp;$form_state){
$form = array();
$form['numberb'] = array(
    '#required' =&gt; '1',
    '#field_prefix' =&gt; 'Number B',
    '#weight' =&gt; '1',
    '#title' =&gt; t('B'),
    '#type' =&gt; 'textfield',
);
$form['numbera'] = array(
    '#required' =&gt; '1',
    '#field_prefix' =&gt; 'Number A',
    '#weight' =&gt; '2',
    '#title' =&gt; t('A'),
    '#type' =&gt; 'textfield',
    );
$form['submit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Add item'),
    '#weight' =&gt; '3',
);
 return $form;
 }
/**
  * how to display A + B
 */
function form_price_form_submit($form, &amp;$form_state) {
$a = $form_state['values']['numbera'];
$b = $form_state['values']['numberb'];
$c = $a + $b;
}
I suggest:


deleting all the default submit handlers in the submit array in the $form variable - to stop the data being stored in the database
add your own submit handler to do the calculation and store the result in the standard PHP _SESSION variable
add a #redirect property in the (correct place) $form array variable to redirect the to URL of the result page
write code for the result page output the result in the _SESSION variable. To do this determine what type of page will display the result so that you can implement appropriate code to display the result  - there are several ways to do it: e.g. code in a template file, or a custom programmatically created block