XML sendAndLoad to PHP

webmasterbeta

New Member
Im having a mare.

Usuing xml to run gusetbook in Flash, with PHP server side to edit XML doc.
I have used the same PHP script loads of times before and been fine. But not this time,...

This is the script in Flash...

Code:

sendXML=new LoadVars();
sendXML=myXML;
sendXML.sendAndLoad("http://www.dropmusic.co.uk/Guestbook/processXML.php", receiverXML);



sento this php

Code:

<?php
$file = fopen("http://www.dropmusic.co.uk/Guestbook/dropguest.xml", "w+") or die("Can't open XML file");
$xmlString = $HTTP_RAW_POST_DATA;
if(!fwrite($file, $xmlString)){
print "Error writing to XML-file";
echo "
<script type='text/javascript'>
alert('failed');
</script>
";
}
echo "
<script type='text/javascript'>
alert('Passing');
</script>
";
print $xmlString."\n";
fclose($file);
?>


then recieved by reciever in Flash...

Code:

receiverXML.onLoad = myOnLoad;
function myOnLoad(success){
if(success){
getURL("javascript:alert('received ok')");
this.contentType = "text/xml";
this.showXML(1);
}else{
getURL("javascript:alert('failed')");
}
}


url for example...(goto contact/guestbook)...


<!-- m --><a class="postlink" href="http://www.dropmusic.co.uk/drop7.html">http://www.dropmusic.co.uk/drop7.html</a><!-- m -->


pleeeeaaasseeee...can any spot an obvious mistak or have any ideas!![/url]
 
Back
Top