Problem: The PHP $_POST[] cannot get any key or elements.
What is an appropriate data structure for this case?
//Data format:
[{"ENG_NAME_OF_OWNER":"xxx xxx xxx",
"CAPACITY":"",
"MEMORIAL_NUMBER":"08060500610190ASSIGNMENT WITH PLAN",
"DATE_OF_INSTRUMENT":"19/05/2008",
"DATE_OF_REGISTRATION":"05/06/2008",
"CONSIDERATION":"$2,668,000.00",
"REMARKS":"",
"CHI_NAME_OF_OWNER":"xxx xxx xxx"},
{"ENG_NAME_.........":""},
{............}]
var array = //Data above;
var URL = "php/landSearchOwnertoDB.php";
var Data = JSON.stringify(array);
$.ajax({url: URL, data: Data, type: "POST",contentType: 'application/json',
success: function(modelData) {
alert(modelData);
}
});
Should I get rid of Array when posting data to php $_POST[]?