Loading Var from Php to flash

Hi,

I am flash newbie and I am trying load a variable from php to flash, I have looked around on this and other forums and this seems like the right code but no luck thus far.

here is my actionscript:

myLoadVar = new LoadVars();
myLoadVars.load(“loadImages.php”);
myLoadVars.onLoad = function (success) {
// If the data loads, display the variable in a
// text field named output_txt on _root.
if (success) {
_root.output_txt.text = this.photoId;
}
};

my php:

$db = new Database();
//load Image
$query = "SELECT ID FROM PHOTO ";
$result = $db->query($query);

$item;

while($row = mysql_fetch_object($result))
{
$item = $row->ID;
}
echo “photoId=”.$item."";

when i run the php I get an output but the flash is not displaying anything.
I have enclosed the fla file aswell, just in case I am doing something really stupid.

any help you could give me on this would be most appreciated.

thanks

ash