# Why isn't this working?

**URL:** <https://forum.kirupa.com/t/why-isnt-this-working/266540>\
**Category:** Uncategorized\
**Created:** [July 21, 2008, 9:03pm UTC](https://forum.kirupa.com/t/why-isnt-this-working/266540 "2008-07-21T21:03:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Holmesc](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@Holmesc](https://forum.kirupa.com/u/Holmesc)\
**Post date:** [July 21, 2008, 9:03pm UTC](https://forum.kirupa.com/t/why-isnt-this-working/266540/1 "2008-07-21T21:03:27Z")

</div>

In a current project, I used part of Kirupa’s Introduction to XML tutorial that showed how to update XML by sending data from Flash to PHP, which would write to the XML file. However, I can’t get it to work for me, and having no knowledge of PHP, I just need to know if the following code should work, so that I can figure out which part of the communication isn’t working. It’s supposed to receive data from a Flash file in the same directory, then send it to an XML file called “data.xml”, also in the same directory.

```php

<?php
$filename = "data.xml";
$raw_xml = file_get_contents("php://input");
 
print $raw_xml;
 
$fp = fopen($filename, "w");
fwrite($fp, $raw_xml);
fclose($fp);
?>

```

Thanks for your help. Here’s the tutorial I mentioned.  
[http://www.kirupa.com/web/xml/examples/simpleeditor.htm](http://www.kirupa.com/web/xml/examples/simpleeditor.htm)
