I need help with getting the saveAndLoad command to return a variable from my php

[FONT=Courier New][FONT=Verdana] I am able to send data to the database but the script does not send back the variable data “success” any suggestions?

I have 2 input fields on my form, one drop down and 2 radio buttons, a dynamic text field and a Butto.

the data from the input fields, the drop down and tyhe radio buttons all get to the database, this part is working great.

The dynamic text field shows the data from the error loading variable “Error Loading file”.

When it should have picked up the variable from the php variable and show the word “Success”

Does anyone know why it sends the data to the database and won’t return the variable from php?

[/FONT][/FONT]Here is the action script in flash MX that im using

[FONT=Courier New]function doSubmit(){
sendData = new LoadVars();
recData = new LoadVars();
sendData.name = name;
sendData.species = species;
sendData.speciesType = speciesType.getValue();
sendData.residence = residence.getValue();
recData.onLoad = getResponse();
sendData.sendAndLoad(“register.php”, recData, “post”);

}
function getResponse(result){
if (result == true) {

field.text = “test”;
}
else
{
field.text = “Error loading file.”;
}
};

[FONT=Verdana]And here is the PHP script i’m using
[FONT=Courier New]<?
$name = $_POST[‘name’];
$species = $_POST[‘species’];
$speciesType = $_POST[‘speciesType’];
$residence = $_POST[‘residence’];
$connection = mysql_connect(“localhost”, “root”, “”) or die (“unable to connect!”);
mysql_select_db (“test”) or die (“unable to select database!”);
$query = “INSERT INTO aliens (name, species, speciesType, residence) Values (’$name’,’$species’,’$speciesType’,’$residence’)”; $result = mysql_query($query) or die ("error in query: ". mysql_error());
mysql_close($connection);

$field=“success”;
echo “field=”.$field;

?>[/FONT]

[/FONT][/FONT]