how i detect submit btn name using ajax php

  ajax, php

I need help!
i need to know how i can detect button name for upload.php file so i can put if(isset($_post[‘aa’))

    <script type="text/javascript">
        $(document).ready(function (e) {
            $("#uploadForm").on('submit',(function(e) {
                e.preventDefault();
                var form = $(this);
                var url = form.attr('action');
                $.ajax({
                    url: "upload.php",
                    type: "POST",
                    data:  new FormData(this),
                    contentType: false,
                    cache: false,
                    processData:false,
                    success: function(data)
                    {
                        $("#targetLayer").html(data);
                    },
                    error: function() 
                    {
                    }             
                   });
            }));
        });
    </script>
    

Source: Ask PHP

LEAVE A COMMENT