Say I have an xml document contained in the variable xmlDoc

Now if I send that to the server using

xmlHttp.open("POST", url, true);
	xmlHttp.onreadystatechange = handleStateChange;
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttp.send(xmlDoc);

How is the serverside php code going to handle this? As form data are retrieved as

fn = _POST["firstName"]

if the form has a field firstName. But in this case the xmlHttp is sending a text (xml) which is not part of a form. How do I gracefully handle this using php script?

Thanks.

Recommended Answers

All 2 Replies

use jquery

"jQuery is a lightweight cross-browser JavaScript library designed to simplify the client-side scripting of HTML."

My problem is obviously at server side not at client side.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.