Display Database

Hello, i have no idea how to display a database in FLASH i know how to display the database in html,

can someone help me pls.

this is wat i have (PHP)

<?
//CONFIG.PHP

$host= "localhost";
$dbname= "test";
$uname= "root";
$pass= "root";
?>
<?
//Code to display DATABASE (staff.php)

require_once "conf.php";

$link = mysql_connect("$host","$uname","$pass") or die("OMG CHECK THE DAMN SETTINGS");
mysql_select_db("$dbname") or die("Database Does not exist");


$result = mysql_query("select * from test ORDER BY ID DESC");

while($r=mysql_fetch_array($result))
{
$name=$r["name"];

echo "$name";

}
mysql_close($link);
?>