<?php header('Content-type: text/xml'); ?>
<rss version="2.0">
<channel>

 <title>Malaspina University-College | Media Studies Department</title>
 <description>Upcoming Events at Media Malaspina</description>
 <link>http://gatesj.learnnewmedia.ca/events.php</link>

<?php

	require_once('../mysql_connect.php'); // Connect to the db

	$getItems="SELECT event_title, event_summary FROM event_tb ORDER BY event_id DESC";
	$doGet=mysql_query($getItems);

	while($item=mysql_fetch_array($doGet)) {

		$title=$item['event_title'];
		$summary=$item['event_summary'];
?>

		<item>
		<title><?php print $title; ?></title>
		<description><?php print $summary; ?></description>
		<link>http://localhost/mal/events.php</link>
		</item>

<?php 	 }; ?>
  
</channel>
</rss>	 
