You are here

function dynamic_banner_default_admin_form_submit in Dynamic Banner 6

Save a new Banner to the database.

File

includes/callbacks.inc, line 125
Dynamic Banner Admin Pages and various other functions to make them work Most of the code in this file was derived from path module

Code

function dynamic_banner_default_admin_form_submit($form, &$form_state) {

  // remember text is optional. save the default banner
  $default_banner = array(
    'imgurl' => $form_state['values']['imgurl'],
    'text' => $form_state['values']['text'],
    'link' => $form_state['values']['link'],
  );
  variable_set('dynamic_banner_default_banner', json_encode($default_banner));
  drupal_set_message(t('The default banner has been saved.'));
  $form_state['redirect'] = 'admin/build/banners';
}