Sign Up

welcome

Already have an account? Sign In

Sign In

welcome

Sign Up
Login with Google

Don't have account, Sign Up Here
Sign In Sign Up

letsrectify

letsrectify
  • Home
  • About Us
  • Contact Us
  • Jobs
Ask a Question
Home
jugraj singh
Asked: 20-01-22

create form using ajax in PHP

  • 1

<script>

   $(document).ready(function(){

       $('#form-id').on('submit',function(e){

           e.presentDefault();

 

           $ajax({

               type: "POST",

               url: "form/store",

               data: $('#form-id').serialized();

               success: function(response)

               {

                   console.log(response)

                   alert("data is stored");

               },

               error: function(error){

                   console.log(error)

                   alert("data is not saved");

               }

           });

       });

   });

</script>

Share
  • Facebook

0 More Answers

  • Answers
Cancel reply

Sidebar

Ask A Question
letsrectify

Categories

  • Technology
  • Food
  • Health
  • Sports
  • Science
  • Politics
  • Marketing

Policies

  • Terms & Conditions
  • Privacy Policy

About Us

  • About Us
  • Contact Us
  • Feedback

© 2025 All Rights Reserved by
Letsrectify.com