I want to pass a form via json to my php and then insert the data into the database.
function enviaDados(form){
var dados = document.getElementById('form');
console.log(dados.categoria.value);
$.ajax({
type: "POST",
data: "teste do json mo louco",
url: "includes/post.php",
success: function(msg){
console.log(dados.categoria.value);
}
});
alert("sadfdsaf");
}
How do I read this json in my php?