php - $.ajax POST not working but GET works fine -


been on while now. codes below works when " type: 'post' " changed " type: 'get' ". why not working post?

    $.ajax({         type: 'post',         url: 'http://www.example.com/ajax/test.php',         data: { name: "overcomer", email : "info@overcomer.we"},         cache: false,         datatype: "html",         beforesend: function() { console.log('firing ajax'); },         success: function (response) {             console.log('success');         },         error: function (xhr, ajaxoptions, thrownerror) {             console.log("error:" + xhr.responsetext+" - "+thrownerror);         }     }); 

whe change post on jquery, must change post in php.

so, on php code change: $_get['name'] $_post['name'] , $_get['email'] $_post['email'] (related) $_get $_post

if not working, post php code here.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -