I have these two but I do not know how to combine them to save as much as a text image and multiple checkboxes or if they have any other that they can provide me.
$(document).ready(function(){
$("#formulario").submit(formulario1)
function formulario1(evento){
evento.preventDefault()
var datos = new FormData($("#formulario")[0])
$("#cargando").html("<img src='img/cargar.gif'>")
$.ajax({
url: 'agregar.php',
type: 'POST',
data: datos,
contentType: false,
processData: false,
success: function(datos){
$('#formulario')[0].reset();
$("#cargando").html(datos)
}
})
}
})
and
$(document).ready(function(){
$('#formulario').click(function(){
var languages = [];
$('.get_value').each(function(){
if($(this).is(":checked"))
{
languages.push($(this).val());
}
});
languages = languages.toString();
$.ajax({
url:"agregar.php",
method:"POST",
data:{languages:languages},
success:function(data){
$('#result').html(data);
}
});
});
});