Passing variables from flash to php to mySql and back again problem

hi everyone,

iv bin working on this piece of code for the last few days and theres just one tiny little piece that isn’t working and iv no idea how!

im sending info from my flash file to php which retrieves info from mySQL database and then i want the database info to be displayed back in my flash file. Its doing all this correctly but when i want to display the database info in the flash file its not displaying it.

heres my php code.

<?PHP
if (isset($_GET[“instructions_IDflash”] )) {
echo $_GET[“instructions_IDflash”];
} else {
echo “$_GET[“instructions_IDflash”] is not set”;
}

$instructions_ID_number = $_GET[‘instructions_IDflash’];

$user_name = “root”;
$password = “”;
$database = “game”;
$server = “127.0.0.1”;
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);

if ($db_found) {

$SQL = “SELECT instructions FROM main_instructions WHERE instructions_ID = $instructions_ID_number”;
$result = mysql_query($SQL);

while ($db_field = mysql_fetch_assoc($result)) {
$instrs = $db_field[‘instructions’] . “<BR>”;
print "these are the instructions = " . $instrs;

}

print("&Data1=$instrs");

mysql_close($db_handle);

}
else {
print "Database NOT Found ";
mysql_close($db_handle);
}
?>

the line ‘print("&Data1=$instrs");’ is posing problems. if i leave out the & sign it prints undefined in the flash text box, or if i leave out the $ sign instead it prints ‘instrs’ in the textbox, but it won’t actually display the text thats bin loaded in from the database and stored in $instrs.

any ideas why? any suggestions would really be appreciated.

x C

my flash code looks like this if that helps

stop();

dataOut =new LoadVars

interval = setInterval(this, “pauseThis”, 10000);
function pauseThis():Void {
dataOut.instructions_IDflash = 1;

//dataOut.sendAndLoad (“http://localhost/calc.php”, “dataout”,“GET”);
dataOut.send (“http://localhost/instructions.php”, “dataout”, “GET”);

clearInterval(interval);
this.removeMovieClip();
}

//dataOut.onLoad = function(){
//trace(this.instructions_IDflash)
//}
//First we make a new loadvars object to hold
// the variables that are being loaded from the php file.
myData = new LoadVars();
//this is the part where we execute the
//function that handles the loaded data.
myData.onLoad = function(){
txtBox1.text = myData.Data1;
};

myData.load(“http://localhost/instructions.php”);