è un problema di php più che di flash, comunque...
manca una riga nel codice:
Codice PHP:
<?php
header("Content-type: text/xml");
$host = "localhost";
$user = "root";
$pass = "";
$database = "gestione";
$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 * from news ORDER BY id DESC";
$resultID = mysql_query($query,$linkID) or die ("Data not found");
$xml_output = "<?xml version =\"1.0\"?>\n";
$xml_output = "<rss>\n";
for ($x = 0; $x < mysql_num_rows($resultID); $x++){
$row = mysql_fetch_assoc($resultID);
$xml_output .= "\t<channel>\n";
$xml_output .= "\t<item id=\"" . $row['id'] . "\"/>";
$xml_output .= "\t\t<title>" . $row['title'] . "</title>\n";
$xml_output .= "\t\t<pubDate>" . $row['pubDate'] . "</pubDate>\n";
$xml_output .= "\t\t<image>" . $row['image'] . "</image>\n";
$xml_output .= "\t\t<description>" . $row['description'] . "</description>\n";
$xml_output .= "\t\t<link>" . $row['link'] . "</link>\n";
/* -> qui -> */ $xml_output .= "\t</item>\n";
$xml_output .= "\t</channel>\n";
}
$xml_output.= "</rss>";
echo $xml_output;
?>