The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
XML document must have a top level element. Error processing resource 'http://www.toon-workshop.net/rss/index.php'.
And this is the code im using in a file called index.php:
<? header('Content-type: text/xml'); ?>
<?php
include ('../includes/db_config.php');
mysql_select_db('chrimail_login') or die (mysql_error()); // Selecting Database
?>
<rss version="2.0">
<channel>
<title>Test Title</title>
<description>This is an example description</description>
<link>http://pixel2life.com</link>
<?
$sql = "SELECT * FROM topics WHERE fid = 9 LIMIT 5";
$result = mysql_query($sql);
while($row = mysql_fetch_assoc($result)){
?>
<item>
<title><?=$row['title']; ?></title>
<author><?=$row['author']; ?></author>
<link>http://MYSITE.com/news.php?id=<?=$row['id']; ?></link>
</item>
<?
}
?>
</channel>
</rss>
Edited by Hip Hop Artist, 13 September 2007 - 09:50 PM.
