XML + database in php to send to Flash music player

Dear genius,

I have been trying to convert xml to php and make it be able to connect to the MySQL database and send it to flash music player. But im really stuck!!

the original xml code is like this:

[SIZE=“1”]<?xml version=“1.0” encoding=“UTF-8”?>
<songs>
<song url=“1.mp3” image=“img1.jpg” artist=“artist of track one” trackname=“track number one” />
<song url=“2.mp3” image=“img2.jpg” artist=“artist of track two” trackname=“track number two” />
</songs>[/SIZE]

and i want to convert it to php so I can make it like
[SIZE=“1”]<song url="(from datadase)" image="(from datadase)" artist="(from datadase)" trackname="(from datadase)" />[/SIZE]

I would be great if you could help me!!

Please see the codes below for what Ive done so far…:

[SIZE=“1”]<?php

header(“Content-type: text/xml”);

require(‘include/share.php’);

$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 aAudio WHERE mID=’” . $_REQUEST[‘mID’] . “’ ORDER BY orderID”;
$resultID = mysql_query($query, $linkID) or die(“Data not found.”);

$xml_output = "<?xml version=“1.0”?>
";
$xml_output .= "<songs>
";

for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){
$row = mysql_fetch_assoc($resultID);
$xml_output .= " <song url=’" . $row[‘audioFile’] . “’ image=’” . $row[‘thumbnail’] . “’ artist=’” . $row[‘title’] . “’ trackname=’” . $row[‘title’] . "’ />
";

}

$xml_output .= “</songs>”;

echo $xml_output;

?>[/SIZE]