XML data ok.. but the php file doesnt do the job
Hello
Im trying to do a guestbook. And i can read very well the XML file and show it. The problem is to save the XML after the post.
I have cheked the XML befaure it is send e it is OK. Só my problem must be de part of AS3->PHP->XML file
here is my code in FLASH...
var urlFicheiroPHP:URLRequest = new URLRequest("mensagens.php");
urlFicheiroPHP.data = myXML;
urlFicheiroPHP.contentType = "text/xml";
urlFicheiroPHP.method = URLRequestMethod.POST;
var loader:URLLoader = new URLLoader();
loader.load(urlFicheiroPHP);
loader.addEventListener(Event.COMPLETE, loadOkFicheiroPHP);
Here is my code in PHP
<?php
if (isset($GLOBALS["HTTP_RAW_POST_DATA"])){
$xml .= $GLOBALS["HTTP_RAW_POST_DATA"];
$file = fopen("messages.xml","wb");
fwrite($file, $xml);
fclose($file);
echo "teste";
}
?>
HEEEEEEELLLLLLLLLLLPPPPPPPPP!!!!... ![]()