You are here

function quotes_bios_submit in Quotes 7

Same name and namespace in other branches
  1. 5 quotes.module \quotes_bios_submit()
  2. 6 quotes.admin.inc \quotes_bios_submit()

Submit the authors name for bio modification.

After Modification of the bio submit update the db tables.

Parameters

array $form: The form that was submitted.

array $form_state: The array specifying the form values.

File

./quotes.admin.inc, line 548
The quotes module allows users to maintain a list of quotes that can be displayed in any number of administrator-defined quote blocks.

Code

function quotes_bios_submit($form, &$form_state) {
  if ($form_state['values']['op'] == 'Update') {
    $vals = array(
      $form_state['values']['bio'],
      $form_state['values']['aid'],
    );
    $upd = db_update('quotes_authors')
      ->fields(array(
      'bio' => $form_state['values']['bio'],
    ))
      ->condition('aid', $form_state['values']['aid'])
      ->execute();
    $form_state['redirect'] = QUOTES_BIOS_PATH;
  }
  else {
    $form_state['redirect'] = QUOTES_BIOS_PATH . '/' . $form_state['values']['author'];
  }
}