[FLASH 8 , AS2] hi everyone … I’ve allowed myself to request help on this one. I’ve been stuck for quite some time now :x
here’s the situation:
function writeUpdates(textje:String) {
sendingLV = new LoadVars();
receivingLV = new LoadVars();
receivingLV.onLoad = function(success)
{
if(success)
{
openLogging("connetion succeeded", false); //box displaying the message
}else{
openLogging("unable to communicate",false); //box displaying the message
}
}
sendingLV.inputData = textje;
trace(sendingLV.toString());
sendingLV.sendAndLoad("verwerkUpdates.php",lvIn,"POST");
}
the output of the “trace” command right before sending (which proves the loadvars is not empty) is as follows:
inputData=%0D%0DSuggesties%20december%20%0D%0D%0D%0DVoorgerechten%0D%0DD%0D%0D%E2%99%A6%0D%0DDesserten%0D%0DBordje%20met%20zachte%20kazen%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%E2%82%AC%20%209%2E5%0D%0DZwart%20woud%20gebak%20met%20een%20coulie%20van%20krieken%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%E2%82%AC%20%206%2E5%0D%0D%20%20%20%0D%0D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Geniet%20ervan%21%21%21
and here’s my PHP file which should process the "POST’
<?php
$xmlString = $_POST['inputData'];
$newXML = str_replace("\\\"","\"",$xmlString);
$newerXML = str_replace("&","en",$newXML);
if (is_null($xmlString)) {
echo "phpTXT = nothing sent";
}
else {
$file = fopen("file.txt", "w");
if(!fwrite($file, $newerXML)){
echo "phpTXT = Error writing to file";
}
echo $xmlString."
";
fclose($file);
}
?>
So:
- i know PHP is receiving the request, but the $xmlString remains empty;
- the permissions on all related files are 777;
- all related files are stored in the same directory;
Does anyone have an idea ?
Thanks,
Jeroen