[horde] Question about Ajax.Request

Mike Poznecki poz_sa at yahoo.com
Mon Apr 9 19:32:09 UTC 2018



I need to pass an array and a string to my php page. But I cannot figure out how to do this. Here is my code:
Javascript: (myVar is an array.)
function processData(myVar){  new Ajax.Request('myPage.php', {    type: 'post',    data: {myCmd: 'ProcessIt', addData: myVar},  onSuccess: function(transport) {    return transport.responseText;  }  });}
PHP:
<?phpif (empty($_POST)){ // $_POST is always empty.  Even though the type is array.}


As my comment says, $_POST is always empty. I have tried many ways to get some values out of it, but it is just empty.
Can someone show me what I am doing wrong?






More information about the horde mailing list