Php|mysql|flash8 - login probs?

Hey all,

i’ve got plenty of logins working through flash and php and mysql before so thats not a prob but here is my new prob…i have all my content animate through AS as it comes up and they r all linked via mc’s so nothing on the stage AS does it all…inside these mc’s is my login…but when it is not on the main timeline i can’t seem to access my page i wish to have access to via the login here is the AS code:
this is on the frame:

stop();
alogin_txt.restrict = "a-zA-Z0-9";
apass_txt.restrict = "a-zA-Z0-9";
Selection.setFocus(alogin_txt);
status = "Enter your information and submit";
this.onEnterFrame = function() {
    if (checklog == 1) {
        checklog = 0;
        _root.menu_6.gotoAndStop("correct");
    }
    if (checklog == 2) {
        checklog = 0;
        _root.menu_6.gotoAndStop("incorrect");
    }
};

can anyone please take a look at this and see if i have done anything wrong??

this is on the login button:

on (release, keyPress "<Enter>") {
    if (username != "" && password != "") {
        status = "Begin Login Process - Wait...";
        loadVariablesNum("admin_login.php", 0, "POST");
    }
}

likewise here…

and here is my php code for “admin_login.php”:

<?
$user=$_POST['username'];
$pass=$_POST['password'];

if ($user && $pass){
    mysql_pconnect("$host","$user","$pass") or die ("didn't connect to mysql");
    mysql_select_db("$dbname") or die ("no database");

$query = "SELECT * FROM users WHERE username = '$user' AND password = '$pass'";
$result = mysql_query( $query ) or die ("didn't query");

$num = mysql_num_rows( $result );
if ($num == 1){
    print "status=You're in&checklog=1";
    } else {
    print "status=Sorry, but your user name and password did not match&checklog=2";
}
}
?>

this is an extremely basic login script to just check if it can actually work…but doesn’t seem to be atm…

Thanks in advance peeps if you can help me out :D:D