You are here

function contact_category_delete_form_submit in Contact 6.2

Same name and namespace in other branches
  1. 7.2 contact.admin.inc \contact_category_delete_form_submit()

Submit handler for the confirm delete category form.

See also

contact_category_delete_form()

File

./contact.admin.inc, line 173
Admin page callbacks for the contact module.

Code

function contact_category_delete_form_submit($form, &$form_state) {
  $contact = $form['contact']['#value'];
  db_query("DELETE FROM {contact} WHERE cid = %d", $contact['cid']);
  drupal_set_message(t('Category %category has been deleted.', array(
    '%category' => $contact['category'],
  )));
  watchdog('contact', 'Category %category has been deleted.', array(
    '%category' => $contact['category'],
  ), WATCHDOG_NOTICE);
  $form_state['redirect'] = 'admin/build/contact';
}