1var deleteClient = function(id) {
2 $.ajax({
3 url: 'path/to/php/file',
4 type: 'POST',
5 data: {id:id},
6 success: function(data) {
7 console.log(data); // Inspect this in your console
8 }
9 });
10};
1// Most effective way to call a javascript function with parameter of PHP variable
2echo '<input type="button" value="Button" onclick="return openEditor(\'' . $path_image . '\')">';