I have a client side code in jquery and from client side code I need to store some data on server side in form of XML files that are written using PHP. I'm done with the code for writing PHP files. However, I'm not able to pass client side code to PHP file. jQuery post is also not working. I tried query strings but as I said data is too large thus it doesn't work.
Any suggestions?
Thank you for your time and consideration.:)
Some Test Code:
jQuery POST
$.post("test2.php", { userdata: "test"} );
Ajax POST
$(document).ready(function()
{
$(document).ready(function()
{
$.ajax({
type: "POST",
url: "test2.php",
data: "userdata=" + "test"
});
});
});
PHP Code
$test = $_POST['userdata']; $document = new DOMDocument();
$document->load("collection.xml");
//Write XML file generation code