You are here

function mp3player_player_delete_submit in MP3 Player 7.2

Same name and namespace in other branches
  1. 6.2 mp3player.module \mp3player_player_delete_submit()
  2. 6 mp3player.module \mp3player_player_delete_submit()

Delete a player.

File

./mp3player.module, line 593
mp3player main module file.

Code

function mp3player_player_delete_submit($form, &$form_state) {
  $player = mp3player_players($form_state['values']['pid']);
  db_query('DELETE FROM {mp3player_players} where pid = %d', $player['pid']);
  drupal_set_message(t('MP3 Player %name was deleted.', array(
    '%name' => $player['name'],
  )));
  $form_state['redirect'] = 'admin/settings/mp3player';
}