0
In a certain area of my site, the user can select some rows of the database to export them to a JSON, after selecting all that want an Ajax call is made to get the data from it, but within the return how do I download it? For example:
jQuery.ajax({
type: "POST",
url: "seleciona-dados.php",
data:{data: ids},
success: function(data){
//data já irá vir em formato JSON pelo PHP, como faço o download do mesmo para um arquivo?
}
});
It would not be better to return a file from the server-side?
– Jéf Bueno
It’s an option too, as I never did, I didn’t know how to formulate the question, but I’m open to other ways too.
– Leo Letto