php - What is wrong with this code because the submit button is not working? -


here code. wordpress pages created.both pages in same folder. sending data leadgen.php page-success.php

jquery.ajax({     url: "http://localhost/success-page",     type: "post",     data: 'name=' +name+'&email='+email+'&phone='+phone+'&content='+'&city='city+'&date='+date+'&event_type='+event_type+'&service='+service+'&guests='+guests+'&budget='+budget+'&locality='+locality+'&food_type='+food_type+'&venue_type='+venue_type+'&photography_type='+photography_type;      success:function(data){     document.location.href = 'http://localhost/success-page/';     },     error:function (){}     }); }); 

post data this, not use query string.

 jquery.ajax({    url: "http://localhost/success-page",    type: "post",    data: {       name: name,       email: email       // more data want post....     },    success:function(data){        document.location.href = 'http://localhost/success-page/';     },   error:function (){}   }); 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -