Hi everyone,
I have problem that after two days googling can't find solution. I have a .swf file that reads from .xml file, and that part is working right. But there is a part of a code where i want to save changes on the .xml file via php. In other words, there is a flash form where user can make changes and then click save button, and when that button is clicked, i want the changes to .xml to be saved on the server, to overrite the existing file with the new one created in ac3 according the user input. Here is the code for as3, for the handler of click event for the save button.

Code:
private function klik(event:MouseEvent):void{
        podatociXML.novo1.naslov1=naslov1.text.toString();
	podatociXML.novo1.vesti1=vesti1.text.toString();
	podatociXML.novo2.naslov2a=naslov2a.text.toString();
	podatociXML.novo2.vesti2a=vesti2a.text.toString();
	podatociXML.novo2.naslov2b=naslov2b.text.toString();
	podatociXML.novo2.vesti2b=vesti2b.text.toString();
	podatociXML.novo3.naslov3=naslov3.text.toString();
	podatociXML.novo3.vesti3=vesti3.text.toString();

        var phpURL:URLRequest = new URLRequest("admin.php");
        phpURL.method = URLRequestMethod.POST;
	phpURL.contentType="text/xml";
	phpURL.data = podatociXML.toXMLString();//podatociXML is the XML variable that contains the xml file that was loaded in other part of the code

        var sendLoader:URLLoader = new URLLoader();
	sendLoader.addEventListener(Event.COMPLETE,gotovo);
	sendLoader.load(phpURL);
}
And here is the php code that writes the file, or the admin.php file :

PHP Code:
<?php
$fh 
fopen("vesti.xml"'w') or die("can't open file");
fwrite($fh$HTTP_RAW_POST_DATA);
fclose($fh);
?>
The problem is that nothing is actually written on the .xml file, it remain the same as i created it. I tested on local server and on remote server, the result is the same - nothing is change on the xml file. I allready check for permissoins, it is allowed on the both servers. Anyone have the solution?
Thanks.