<?php header('Content-type: text/xml'); ?>

<rss version="2.0">
<channel>
<title>The Wrestling Oratory</title>
<description>Leaving Its Mark.</description>
<link>http://oratory.rajah.com/</link>
<copyright>All material copyright 2006 their respective owners</copyright>

<?php

include ("./Admin/config.php");

	$dbh=mysql_connect("localhost", "oratoryds", "enterhere") or die ("Unable to connect");
mysql_select_db("oratory") or die ("Unable to hard connect");

$result = mysql_query("SELECT id, title, comment, username, date FROM posts ORDER BY date DESC LIMIT 0 , 15",$dbh) or die("Query failed : " . mysql_error());

while ($myrow = mysql_fetch_array($result)) {

$myrow['comment']=str_replace("&", "and", $myrow['comment']);

?>
     <item>
        <title> <?php echo $myrow['title']; ?></title>
        <description> <?php echo $myrow['comment']; ?></description>
        <link>http://oratory.rajah.com/index.php?id=<?php echo $myrow['id']; ?></link>
     </item>

<?php

}

?>

</channel>
</rss>
