function currency_form_submit in Currency 6
Same name and namespace in other branches
- 5 currency.module \currency_form_submit()
- 7 currency.module \currency_form_submit()
Submit handler for the currency exchange form.
File
- ./
currency.module, line 156 - This module provides currency exchange rates.
Code
function currency_form_submit($form, &$form_state) {
// Save the last used values in the session.
$_SESSION['currency_amount'] = $form_state['values']['currency_amount'];
$_SESSION['currency_from'] = $form_state['values']['currency_from'];
$_SESSION['currency_to'] = $form_state['values']['currency_to'];
// Rebuild the form to keep the submitted values in $form_state.
$form_state['rebuild'] = TRUE;
}