Confirmation popup Box according to a condition on submit button

I am using Drupal 7. In my list I have 2000 subscribers. Now I want a confirmation box before executing the form. The only issue is If I have more than 20 users I want the confirmation form to ask the question” Do you want to continue with 20 users’ If the answer is yes, then perform some php operation on it else go to the main page.

 function player_operation_display_form_submit($  form, &$  form_state)   {    if($  total_players > 20){    echo '<script type="text/JavaScript">    var a = confirm("Do you want to continue with more than 20 users");    if(a){          $  operation[] = array('Assign_goals', array($  records_value, $  records_key, $  assign_username));      }  else{       drupal_goto('exit_operation');       die();  }  </script>';       } 

Now I understand that $ operation[] and exit_operation are my php functions and wont execute in my js file. I just want to know how to execute these functions.