I have this line for delete a folder
<button class='elimina' data-elimina='$path/$file'>elimina $path/$file</button>
get the folder path via JQuery
$(".elimina").click(function(){
var data = $(this).data('elimina');
$.post('file.php',data, function(response) {
// Log the response to the console
console.log("Response: "+response);
});
});
At the last I pass it to my file.php
$archivo = $_POST['data'];
rmdir($archivo);
But never got pass the var data to my php file .I put an if(isset($_POST['data'])){echo $_POST['data'];} and never saw the path,but I now the path arrive to Jquery script (because also tested).
I haven´t form,only the button,could be it the problem?