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 485
Examples demonstrating the backdrop File API (and Stream Wrappers).

Code

function file_example_show_session_contents_submit($form, &$form_state) {
  // If the devel module is installed, use it's 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>');
  }
}