Skip to content Skip to sidebar Skip to footer

How To Add Ajax Submit To Php Validation And Return Message?

I've been working my way up on validating a form and got the JS and PHP validation to work but I am still having a hard time adding ajax(with or without JQUERY) to submit to the ph

Solution 1:

$('form').on('submit',function() {

$.ajax({
       url: 'form_validation.php',
       data: $(this).serialize(),
       type: 'POST'
            }).done(function(data){

                  // you can append a success message to your document here

            });


                                  });  

Post a Comment for "How To Add Ajax Submit To Php Validation And Return Message?"