javascript - fetching data from xmlhttprequest as an array in php -


Is there a way to get data from XML? Object as an object (not using JSN and JQR) in php?

I have encountered a text that will handle the AJAX requests in php for the first time to check whether the input data is an array or not. Here is the code about the text:

   

You will need to create QUERY_STRING with encoded field names and digits (let's assume GET You will send these fields through a form, QUERY_STRING which you will see in the browser's address bar, which you will need to make through JS).

example:

  var name = 'fld []', // field name encoding = encodericomputer (name), // encoded name query = [], data AFS = array = document.querySelectorAll ('input [name = "' + Name + '"]' to store the document; // Input for (var f = 0; f & lt; flds.length; ++ f) {// Repeat on input / gather data. Joining Push ([enc., EncodeURIComponent (flds [f] .Value]] ('=')); } // Prepare the data query = query.join ('& amp;'); // Query is now ready for transmission: // either through GET: XMLHttpRequestInstance.open ('GET', 'some.php?' + Query, true); // or by post: XMLHttpRequestInstance.send (query);  

$ _ request ['fldd'] will be an array.

Note: When you send mail by mail, you must also send the appropriate headers, see:


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -