Saving and loading different xml´s?

Hi…

I am working on an advanced slideshow player width seperate editor. The editor is based on the code for Kirupas great news editor: http://www.kirupa.com/web/xml/examples/newseditor.htm But in my slideshow editor i need to save and load different xml-files width different names. :puzzled:

In Flash the most important code looks like this:
[COLOR=RoyalBlue]
var xml_file = “slides.xml”;
_global.xml_file_link = xml_file;
var save_script = “slides_save.php”;

var slides_xml = new XML();
slides_xml.ignoreWhite = true;
slides_xml.contentType = “text/xml”;
slides_xml.onLoad = function(success){
if (success){
ShowSlides(this);
}
else link_txt.text = “*** Error loading XML file ***”;
}

RefreshSlides(slides_xml);

SaveSlides = function(slides_xml){
data_box.content_txt.htmlText = “<i>Saving and Loading…</i>”;
slides_xml.xmlDecl = “”; // fixes duplication bug
slides_xml.sendAndLoad(save_script, slides_xml);
}
RefreshSlides = function(slides_xml){
data_box.content_txt.htmlText = “<i>Loading…</i>”;
slides_xml.load(xml_file+"?"+new Date().getTime());
}[/COLOR]

The php code:

[COLOR=RoyalBlue]<?php
$filename = “slides.xml”;
$raw_xml = file_get_contents(“php://input”);

print $raw_xml;

$fp = fopen($filename, “w”);
fwrite($fp, $raw_xml);
fclose($fp);
?>[/COLOR]

I belive the answer is to send a var to php insted of the static name “slides.xml” But i cant get anything to work. Anyone knowing what to do here!? Any help would be genious! :sure: