title: get the value of a row in ajax
body: <p>I am having problem getting the value of the row of my table using ajax and so far every time im getting its values its giving me nothing in return here is how i get it.</p>
  
  <h1>select.php</h1>
  
  <pre><code>      while($row = mysqli_fetch_array($result))  
    {  
         $output .= '  
              &lt;tr&gt;  
                   &lt;td&gt;'.$row["wmID"].'&lt;/td&gt;  
                   &lt;td class="first_name" data-id1="'.$row["userFirstname"].'" &gt;'.$row["userFirstname"].'&lt;/td&gt;  
                   &lt;td class="last_name" data-id2="'.$row["userLastname"].'" &gt;'.$row["userLastname"].'&lt;/td&gt;  
                   &lt;td class="payment" data-id3="'.$row["payment"].'" &gt;'.$row["payment"].'&lt;/td&gt;  
                   &lt;td&gt;&lt;button type="button" name="delete_btn" data-id4="'.$row["wmID"].'" class="btn btn-xs btn-danger btn_delete"&gt;Remit&lt;/button&gt;&lt;/td&gt;  
              &lt;/tr&gt;  
         ';
    }  
  </code></pre>
  
  <h1>edit.php</h1>
  
  <pre><code>&lt;?php  
  include_once('../connection.php');
  $sql = "UPDATE tbl_request SET isRemitted = 'Yes' WHERE wmID = '".$_POST['id']."'"; 
  
  $query = "INSERT INTO tbl_remit ('rAmount', 'rDate', 'rTime', 'wmID') VALUES 
  ('".$_POST['payment']."',$date,$time,'".$_POST['id']."')";
  
  if(mysqli_query($conn, $sql) &amp;&amp; mysqli_query($conn, $query))  
  {  
    echo 'Payment Remitted' .mysqli_error($conn);  
  }  else{
  echo 'Rermittance failed' .mysqli_error($conn);  
  }
  ?&gt;
  </code></pre>
  
  <h1>ajax code for updating</h1>
  
  <pre><code>      $(document).on('click', '.btn_delete', function(){  
         var id=$(this).data("id4");   
         var payment=$(this).data("id3");
         var firstname=$(this).data("id2");
         var lastname=$(this).data("id1");
         if(confirm("Is this really remitted?"))  
         {  
              $.ajax({  
                   url:"edit.php",  
                   type:"POST",  
                   data:{id:id,payment:payment},  
                   dataType: "text",  
                   success:function(data){  
                        alert(data);  
                        fetch_data();  
                   }  
              });  
         }  
    });  
  </code></pre>