FMX2004 > PHP > MySQL > PHP > FMX2004

I don’t get it to work !!! :red: (of course/as usual)

I have a Flash-app.
I send vars from it to PHP. (works)
PHP stores in MySQL DB. (works)
PHP sends back to Flash for user verification. (DON’T WORK!)

Can someone with a sulotion help me out on this problem.
Tanks in advance
/Kalliban (super-junior on this thing…)

Action-script for Frame 1:

/// declare LoadVars to send to PHP
abc = new LoadVars();

/// declare LoadVars to recieve from PHP
recieved = new LoadVars();

/// sendAndLoad-function
function dataSAL() {
abc.sendAndLoad(“save.php”, recieved, “POST”);
abc.onLoad = dataRec(true);

/// data recieved=true function
function dataRec(success) {
if (success) {
} else {

AS for textinput “textXYZ”
on (change) { = this.text;

AS for button
on (click) {
/// Load the sendAndLoad-function

AS for Frame 2
/// displaying the text recieved from PHP in the textarea
txtRecieved.text =;

PHP-file save.php:


if ($text){
	$connect = mysql_connect("localhost","root","12345") or die("MySQL-connection error.");
	mysql_select_db("test") or die("MySQL-database error.");

	$query = "INSERT INTO t (text) VALUES ('$text')";
	$result = mysql_query($query) or die("MySQL-INSERT error.");
	$query = "SELECT * FROM t WHERE text='$text'";
	$result = mysql_query($query) or die("MySQL-SELECT error.");