0
good evening, I have the following ajax:
jQuery('#form-contato').submit(function(){
    var nome  = $(this).find('[name="nome"]').val();
    var email = $(this).find('[name="email"]').val();
    var assunto   = $(this).find('[name="assunto"]').val();
    var mensagem   = $(this).find('[name="mensagem"]').val();
    var dados = "&nome=" + nome + "&email=" + email + "&assunto=" + assunto + "&mensagem=" + mensagem;
    jQuery.ajax({
        type: "POST",
        url: "send_contato.php",
        async: true,
        data: dados,
        success: function(data){
          openModal(nome + ", sua mensagem foi enviada com sucesso, em breve entraremos em contato!","success");            
        },
        error: function(data){
            openModal("Houve um erro","error");            
        }
    });
    return false;
});
it works on the desktop, but on mobile always triggers error message, and email arrives empty.
I changed the data to an array, just like you showed and it already worked, thanks.
– Alex Machado
@Axe for nothing!
– Guilherme Nascimento