How to send POST data with jquery ajax to PHP function

     

I want to send POST request with jquery AJAX to PHP function  but it don't give any respond.


JQuery


$.ajax({   url: 'ListProduk.php/SelectData'   type: 'POST'   success: function(data)   {   console.log(data);   }   });  

PHP


function SelectData(){   $sql = "SELECT * FROM MsProduk";
$result = $conn->query($sql);   while($row = $result->fetch_assoc()){   $arr[] = $row;   }   return json_encode($arr);  }  ?>  

Any ideas how to fix it?