You are here

function mail_edit_form_submit in Mail Editor 5

File

./mail_edit.module, line 187

Code

function mail_edit_form_submit($form_id, $form_values) {
  $args = array(
    $form_values['description'],
    $form_values['subject'],
    $form_values['body'],
    $form_values['mailkey'],
  );
  if ($form_values['insert']) {
    db_query("INSERT INTO {mail_edit} (description, subject, body, mailkey) VALUES ('%s', '%s', '%s', '%s')", $args);
  }
  else {
    db_query("UPDATE {mail_edit} SET description = '%s', subject = '%s', body = '%s' WHERE mailkey = '%s'", $args);
  }
  return 'admin/build/mail_edit';
}