Ok here we go ... It's 3:38 after midnight and I still cand find a solution..

I have a flashmovie that asks for a username and a password, then it sends them to a php script which conects to a database, checks for the username and password provided and if it finds them it returns a You made it message and a variable called user_check with the value "ok".

Now the thing is that when I check into the flash movie the variable user_check, it seems like it does not has the OK value in it.

Yes the testing textbox that I created displays the OK value just fine and yes I have places a delay mechanism with a loop that says
If user_check == "ok" goto and play the frame that shows a menu else if user_check =="no" goto the beggining of the movie so the user can enter again a username and password, BUT the IF condition in flash acts like the user_check variable is empty or with a different value than the OK value that php script sends.

The php script works fine and it has no bugs as far as I have seen so I believe the problem has something to do with flash.


PHP code is here:

<?
$dbcnx = mysql_connect("mylocalhost","myusername","mypasswo rd");
mysql_select_db("access_list",$dbcnx);
$result=mysql_query("SELECT LoginName, LoginPassword FROM users");
$authorized="no";
$username=$_GET['username'];
$password=$_GET['password'];
while ($row = mysql_fetch_array($result)){
if ($username==$row["LoginName"] and $password== $row["LoginPassword"]) {
print('&_level0.check_status=You Made it');
print('&_level0.user_check=ok');
$authorized="yes";
}
}
If ($authorized=="no"){
print('&_level0.check_status=Authorization Failed');
print('&_level0.user_check=no');
}
?>

Actionscript IF command is here:

if (_level0.user_check=="ok") {
gotoAndStop(45);
}

Do I have something wrong that I cannot find ?

Please give me a hand or I'll shoot my self