javascript - Ajax call to php not working - no response on button click -
i having below ajax phone call php not working.
var info = ['test1','test2']; $(document).ready(function(){ $(".button").click(function() { $.ajax({ type: "post", url: "getresult.php", data: {testdata : info }, success: function(data) { alert("data: " + data); } }); homecoming false; }); });
php side -
$myarray = $_request['testdata']; echo $myarray;
requesting expects help me.
this should trick:
$myarray = $_post['testdata'];
php javascript ajax
No comments:
Post a Comment