POST isn't passing vars right? Flash, PHP, & MySQL

I’ve been working on this one for days :confused:

I have a basic login script that I’m working on using Flash, PHP, and MySQL.

I pass two variables (playerusername and playerpassword) to a PHP script that checks for them in my MySQL database:

if ($playerusername && $playerpassword){
    $query = "SELECT * FROM auth WHERE username = '".$playerusername."' AND password = '".$playerpassword."'";
    $result = mysql_query($query);
    $num = mysql_num_rows( $result );
    if ($num == 1){
        print "&checklogin_status=1";
    } else {
        print "&checklogin_status=2";

I’ve taken out all my debugging for simplicity, and I’ve tried a lot of things, but this is what I’ve boiled it down to.
A user account that exists in the MySQL DB is ‘test’ with the password ‘test’
All of my code works if I do $playerusername=‘test’; and $playerpassword=‘test’; instead of using POST to get the variables.
However, if I type ‘test’ and ‘test’ into the input fields in flash, it won’t work.
I even tried printing the variables out after using POST to get them, and they ARE ‘test’ and ‘test’!

Try it yourself:
Click play
username: test
password: test
IF IT GOES TO A BLANK SCREEN, login was successful

Any ideas? :confused:

Thanks for your time :slight_smile: Any help is appreciated!