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

Lists in Python -

android - can not access to progress bar in an other activity -

java - Vaadin 7 Pass Data Between Views -