SinanSS adlı üyeden alıntı: mesajı görüntüle
HTML forma 'form' idsini ve jquery kütüphanesini unutmayın hocam.
$('.button').click(function (e) {
        e.preventDefault();
        $('.button').text('Lütfen Bekleyin');
        $('.button').prop('disabled', true);
        let form = $('#form').serialize();
        $.ajax({
            type: 'POST',
            url: 'result.php',
            data: form,
            dataType: 'json',
            success: function (data) {
                if (data.success) {
                    $('.button').prop('disabled', false);
                    $('.button').text('Sorgula');
                    console.log('ok');
                } else {
                    $('.button').prop('disabled', false);
                    $('.button').text('Sorgula');
                    console.log('error');
                }
            }
        });
});
Çok teşekkür ederim hocam