Php to flash

[COLOR=black]I need help to show information from my phpfile in Flash.[/COLOR][COLOR=black]The name of the table is news. I want to show everything from news order by newsid.[/COLOR]
[COLOR=black]I don’t now how to use my whileloop in my phpfile when I should post it to Flash. In my flashfile I use dynamic text to [/COLOR]
[COLOR=black]show the database information and the var is txt_list.[/COLOR]
[COLOR=black]And I use loadVariables to pick up the phpfile:[/COLOR]
[COLOR=black]onClipEvent (load) {[/COLOR]
[COLOR=black]loadVariables("[/COLOR][COLOR=black]stp.php[/COLOR][COLOR=black]", this, “GET”);[/COLOR]

[COLOR=black]This is my phpcode: [/COLOR]

[COLOR=black]<?php [/COLOR]
[COLOR=black]$objConn = mysql_connect (‘localhost’ , ‘root’ , ‘#’); [/COLOR]
[COLOR=black]mysql_select_db (‘stp); [/COLOR]
[COLOR=black]$sql = mysql_query(“SELECT date, headline, text FROM news ORDER BY newsId DESC”) or exit(mysql_error()); [/COLOR]
[COLOR=black]while ($r = mysql_fetch_array($sql)) [/COLOR]
[COLOR=black]{ [/COLOR]
[COLOR=black]echo(’<p><h4>’.$r[‘headline’].’</h4>’.$r[‘date’].’<br />’.nl2br($r[‘text’]).’</p>’); [/COLOR]
[COLOR=black]} [/COLOR]
[COLOR=black]mysql_close($objConn); [/COLOR]
[COLOR=black]?> [/COLOR]

[COLOR=black]When I just want to show one record from news it works fine, like this:[/COLOR]

[COLOR=black]$objConn = mysql_connect (‘localhost’ , ‘root’ , ‘#’); [/COLOR]
[COLOR=black]mysql_select_db (‘stp’); [/COLOR]
[COLOR=black]$query = “SELECT * FROM news WHERE newsId=1”; [/COLOR]
[COLOR=black]$result = mysql_query($query); [/COLOR]
[COLOR=black]$headline = urlencode(mysql_result($result,0,“headline”)); [/COLOR]
[COLOR=black]print "&txt_list=$headline [/COLOR]