title: pass multiple data into delete button in ajax request
body: <p>I need to pass 2 variables in the delete button but I don't know why it was only passing one variable. </p>
  
  <p>Below is my DELETE icon. </p>
  
  <pre><code>&lt;a class="delete_employee" data-emp-id="&lt;?php echo $row_dg["emp_id"]; ?&gt;" data-usr-id="&lt;?php echo $sessID; ?&gt;" href="javascript:void(0)"&gt;
                              &lt;i class="glyphicon glyphicon-trash"&gt;&lt;/i&gt;
                          &lt;/a&gt;
  </code></pre>
  
  <p>Now is the AJAX request</p>
  
  <pre><code>$(document).ready(function(){  
  $('.delete_employee').click(function(e){   
     e.preventDefault();   
     var empid = $(this).attr('data-emp-id');
     var usrid = $(this).attr('data-usr-id');
     var parent = $(this).parent("td").parent("tr");
     bootbox.dialog({
          message: "Are you sure you want to Delete ?",
          title: "&lt;i class='glyphicon glyphicon-trash'&gt;&lt;/i&gt; Delete !",
          buttons: {
              success: {
                    label: "No",
                    className: "btn-success",
                    callback: function() {
                    $('.bootbox').modal('hide');
                }
              },
              danger: {
                label: "Delete!",
                className: "btn-danger",
                callback: function() {       
                 $.ajax({        
                      type: 'POST',
                      url: 'deleteRecords1.php',
                      data: 'usrid='+usrid+'&amp;empid='+empid
  
                 })
                 .done(function(response){        
                      bootbox.alert(response);
                      parent.fadeOut('slow');        
                 })
                 .fail(function(){        
                      bootbox.alert('Error....');               
                 })              
                }
              }
          }
     });   
  });  
   });
  </code></pre>
  
  <p>and below my PHP file to update the record. </p>
  
  <pre><code>&lt;?php
  if($_REQUEST['empid'] &amp;&amp; $_REQUEST['usrid']) {
  $sql = "UPDATE tbl_dies SET is_deleted='1', deleted_id='".$_REQUEST['usrid']."'  WHERE emp_id='".$_REQUEST['empid']."'";
  $resultset = mysqli_query($db, $sql) or die("database error:". mysqli_error($db));
  if($resultset) {
      echo "Record Deleted!";
  }
  }?&gt;
  </code></pre>
  
  <p>So, as I have said, it is passing only 1 variable which is the empid and usrid is missing. </p>