1 file_example.module file_example_show_session_contents_submit($form, &$form_state)

Utility submit function to show the contents of $_SESSION.

Related topics

File

modules/examples/file_example/file_example.module, line 484
Hook implementations for the File Example module.

Code

function file_example_show_session_contents_submit($form, &$form_state) {
  // If the devel module is installed, use its nicer message format.
  if (module_exists('devel')) {
    dsm($_SESSION['file_example'], t('Entire $_SESSION["file_example"]'));
  }
  else {
    backdrop_set_message('<pre>' . print_r($_SESSION['file_example'], TRUE) . '</pre>');
  }
}