I'm trying to implement an RSS feed using PHP, as far as I can see it should be working, as if you view source of the page, you see the XML that should be output into the RSS feed (http://www.mattlewis.org.uk/web/rss.php)
Here's the code for the page:
header("Content-Type: application/xml; charset=ISO-8859-1");
include 'includes/connection.php';
print '<?xml version="1.0" encoding="UTF-8"?>';
print '<?xml-stylesheet type="text/xsl" href="rssXSLT.xsl"?>';
print '<rss version="2.0">
<channel>
<title>FuseArt News</title>
<description>Welcome to our RSS news feed!</description>';
$query = "SELECT * FROM fuseArt_News";
$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
while ($row = mysql_fetch_array($result))
{
$_xml .="<news_item>";
$_xml .="<title>" . $row['Title'] . "</title>";
$_xml .="<date>" . $row['Date'] . "</date>";
$_xml .="<article>" . $row['Article'] . "</article>";
$_xml .="</news_item>";
print $_xml;
}
print '</channel>
</rss>';
Anyone got any ideas as to why it may not be outputting?
Thanks