I have the following script for my client side where i fills up the form and send to server for processing :
function AjaxCall(){
var xmlval='<person><name>'+personObject.GetPersonName()+'</name> <contact>'+personObject.GetPersonContact()+'</contact><about>'+personObject.GetPersonName()+'</about></person>';
//var datas='?xmlvalue='+xmlval;
xmlhttp.open("POST",'ajaxExecutePersonData.php'+xmlval,true);
xmlhttp.setRequestHeader("Content-Type", "text/xml");
xmlhttp.send(xmlval);
}
I need to know how can i receive this POST to the ajaxExecutePersonData.php
and get response.
I am sending xml Object.
Thanks in advance
you need to set the xml as param like this
in your case
and then set the appropriate headers like
and replace the send() call with this one:
and then you have $_POST[“xmlval”] in your php script.
hope this helps 🙂