I'm having a problem using "FormData" objects, it happens that when sending the data with the ajax method (from jquery) the variables $ _POST are not defined in the .php file; honestly I do not know where the fault is, because when you pass a json everything works normally.
Javascript code:
$( "body" ).on("click","#boton_guardar_cambios_entrada",function(e){
var data = new FormData();
data.append('autor','Chris');
$.ajax(
{
url: "editar_entrada.php",
type: "POST",
data: data,
processData: false,
contentType: false,
success: function(json){
alert(json.hello);
}});//fin de ajax
});
And in the file "edit_entrada.php":
<?php
$jsondata = array();
$autor=$_POST['autor'];
$jsondata["hello"]=$autor;
header('Content-type: application/json; charset=utf-8');
echo json_encode($jsondata, JSON_FORCE_OBJECT);
?>