In JS, I got:
var UserName;
var MyArray = new Array();
//...filling array
var rqst = new XMLHttpRequest();
rqst.open('POST',"Some.php",true);
rqst.setRequestHeader('Content-type', 'application/json');
What should I write to send UserName and MyArray to PHP file, so I can access them separately. Like:
$username = $_POST['JSUserName'];
$array = $_POST['JSArray'];
sendmethod or aFormDataobject