well i was using one of the xml/flash slideshow.Well the slide show takes the image source and link as follows from a xml file called images.xml

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

now what i want is to display the latest 3 images from my modelimage folder(the files are uploaded through php and filename is added to database and file is transferred to folder)
googling and going through some tutorials...
i came up with this..

PHP Code:

("Content-type: text/xml"); 

$host "localhost"
$user "root"
$pass ""
$database "dbname"

$linkID mysql_connect($host$user$pass) or die("Could not connect to host."); 
mysql_select_db($database$linkID) or die("Could not find database."); 

$query "SELECT photo_id,image FROM model_photo ORDER BY postedon DESC limit 3"
$resultID mysql_query($query$linkID) or die("Data not found."); 

$xml_output "<?xml version=\"1.0\"?>\n"
$xml_output .= "<images>\n"

$x $x mysql_num_rows($resultID) ; $x++){ 
$row mysql_fetch_assoc($resultID); 
$xml_output .= "\t<pic>\n"
$xml_output .= "\t\t<image>\"http://www.xyz.com/modelimage/{$row['photo_id']}\"</image>\n";  
$xml_output .= "\t\t<link> \"http://www.xyz.com/modelimage/showmodel.php?id= {$row['photo_id']}\"</link>\n";//have doubt in this line
$xml_output .= "\t</pic>\n"

$xml_output .= "</images>"


note:i used google got one tutorial and edited it so it may conatin some parse error...help to remove it would be great

it should be saved as images.php (not xml) but the flash file has the hardcoded images.xml filename(xml file) in actionscript (fla file)...

so how can i get it work with out using any external plugin or mod rewrite(there can be other real xml files)...

any idea...?
here ...the file should be xml but it should contain php which retrives data from mysql to show images

any help
so how can i het it work...
(or i should use only use xml file(with out php) to get data from mysql..if that is the way any help how it can be done)