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

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -