XML sendAndLoad to PHP

  • Skin
  • Student
  • Student
  • User avatar
  • Posts: 76
  • Loc: United Kingdom

Post 3+ Months Ago

Hi,

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: [ Select ]
sendXML=new LoadVars();
        sendXML=myXML;
        sendXML.sendAndLoad("http://www.dropmusic.co.uk/Guestbook/processXML.php", receiverXML);
  1. sendXML=new LoadVars();
  2.         sendXML=myXML;
  3.         sendXML.sendAndLoad("http://www.dropmusic.co.uk/Guestbook/processXML.php", receiverXML);


sento this php

Code: [ Select ]
<?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);
?>
  1. <?php
  2. $file = fopen("http://www.dropmusic.co.uk/Guestbook/dropguest.xml", "w+") or die("Can't open XML file");
  3. $xmlString = $HTTP_RAW_POST_DATA;
  4. if(!fwrite($file, $xmlString)){
  5.   print "Error writing to XML-file";
  6.     echo "
  7.   <script type='text/javascript'>
  8.     alert('failed');
  9.   </script>
  10. ";
  11. }
  12. echo "
  13.   <script type='text/javascript'>
  14.     alert('Passing');
  15.   </script>
  16. ";
  17. print $xmlString."\n";
  18. fclose($file);
  19. ?>


then recieved by reciever in Flash...

Code: [ Select ]
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')");
    }
}
  1. receiverXML.onLoad = myOnLoad;
  2. function myOnLoad(success){
  3.     if(success){
  4.         getURL("javascript:alert('received ok')");
  5.         this.contentType = "text/xml";
  6.         this.showXML(1);
  7.     }else{
  8.         getURL("javascript:alert('failed')");
  9.     }
  10. }


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

[url]
http://www.dropmusic.co.uk/drop7.html
[/url]

pleeeeaaasseeee...can any spot an obvious mistak or have any ideas!![/url]
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 18 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.