How do I pull a variable from php (or XML) into dynamic textbox?

OK, I have my php and MySQL working fine. I’m pulling the data. I found how to format the data that is returned in the php as XML. My problem is I can’t get my Flash textbox to load the variable from the php file. Like most things, this is probably very easy if you know how. I feel quite stupid…help!

My flash dynamic textbox is given the variable name topTeacher. From what I understand, I don’t need to worry about an instance name.

My php file looks like this:
[INDENT][COLOR=darkred]<?php[/COLOR]
[COLOR=darkred]$con = mysql_connect(“localhost”, “USERNAME”, “PASSWORD”) or die(‘Could not connect to server’);[/COLOR]
[COLOR=darkred]mysql_select_db(“technology”, $con) or die(‘Sorry, could not connect to the database’);[/COLOR]
[COLOR=darkred]$sql = “SELECT * FROM teacher INNER JOIN rating ON teacher.teacher_id=rating.rating_id ORDER BY rating DESC LIMIT 1”;[/COLOR]
[COLOR=darkred]$result = mysql_query($sql) or die(‘Sorry, could not get name and ratings’);[/COLOR]
[COLOR=darkred]echo "<?xml version=“1.0”?>
";[/COLOR]

[COLOR=darkred]echo "<topTeacher>
";[/COLOR]

[COLOR=darkred]while ($line=mysql_fetch_assoc($result)){[/COLOR]
[COLOR=darkred]echo $line[“firstname”]." “.$line[“lastname”].” ".$line[“rating”];[/COLOR]
[COLOR=darkred]}[/COLOR]
[COLOR=darkred]echo "</topTeacher>
";[/COLOR]

[COLOR=darkred]mysql_close($con);[/COLOR]
[COLOR=darkred]?>[/COLOR]
[/INDENT]The output currently looks like this on the screen: [COLOR=darkred]Sam Pull 18[/COLOR].
The source code created by the php script looks like this:
[INDENT][COLOR=darkred]<?xml version=“1.0”?>[/COLOR]
[COLOR=darkred]<topTeacher>Sam Pull 18</topTeacher>[/COLOR]
[/INDENT]What should my actionscript be in the frame to pull the data in? Any help would be GREATLY appreciated.