PHP var into Flash - it works, but it doesn't

Hey all again,

I’m still dealing with that same stupid Login thing, but it’s a little different this time. When I got it to work, one of the variables ‘status’ is a textbox that say’s whether or not ‘you’re in’ or ‘no soup for you’.

Now all I want to do is xfer a variable that I can use in a gotoAndPlay thing. I’ve tried a thousand times and have searched through the forums here. I tried Ahmed’s script that starts with lv=new LoadVars(); That didn’t work either. I hope it’s something dumb!!!
Here’s my stuff:


//last lines
if ( $numRow ){
	$auth = 1;
	print "_root.container.checklog=1&_root.container.status=You're in!!";
	
} else {
	$auth = 0;
	print "_root.container.checklog=0&_root.container.status=You're out!!";
	
}
}
?>

[AS]
status = “receiving variables”;
loadVariables(“htmllogintext.php”, this, “POST”);
if(checklog = “1”){
gotoAndStop(62);
}
if(checklog = “0”){
gotoAndStop(61);
}
[/AS]
Can you not use varibles in this way? The script works because the textBox ‘status’ displays what it is supposed to.
Thank you anyone!!

take the “_root.container.” out

php should look like this:


if ( $numRow ){
    $auth = 1;
    print "checklog=1&_root.container.status=You're in!!";
    
} else {
    $auth = 0;
    print "checklog=0&_root.container.status=You're out!!";
    
}
}
?>

that should work…

That didn’t do it. Would there be a prob because the movie that’s calling the vars is a movie loaded into a movie?

I also made a textbox with the var ‘checklog’ to see if it’s working and it stays blank. Is the path messed up?

Post your fla

Files - thanks Eyez

…And here’s the PHP script - just in case anyone wants to see it. I really don’t think that’s the problem.

Bump???

in your PHP:
$numRow = mysql_numrows( $result );
should be
$numRow = mysql_num_rows( $result );
and
print “checklog=1&_root.container.status=You’re in!!”;
should be
print “&checklog=1&status=You’re in!!”;
(there’s no “container” in that fla, and status being on the _root, that’s all you should need…

I’ll try the ampersand in front of the var checklog. That fla is actually loaded into a different swf called ucs. Will I need to target the variable when it’s loaded into another movie like the status textbox needs to be?

I tried the changes as you suggested and it still does the same thing. The status text box still changes the way it’s supposed to but the gotoAndPlay(5); still doesn’t work. Was that the only idea you had? I’m lost…:*(

I’ll post the fla again becuase it has changed a few hundred times. Thanks for any help!!