Database not responding?

Hi guys…new to the forum, and also pretty new to mysql and php (not new to AS or flash though)

I’m having a problem with the login tutorial from this site. It seems as though mysql isn’t taking the queries that php sends to it. php is able to connect to mysql though (I have confirmed this through running a test php file to check connect)

here’s the php


if ($user && $pass){
 mysql_pconnect("","dmcdowell","xxxxxx") or die ("didn't connect to mysql");
 mysql_select_db("dmcdowell") or die ("no database");
//make query

$query = "SELECT * FROM `auth` WHERE `username` = '$user' AND `userpassword` = '$pass'";

$result = mysql_query( $query ) or die ("didn't connect to mysql");

$num = mysql_num_rows( $result );
if ($num == 1){
 print "checklog=1&status=you're in";
 } else {
 print "checklog=2&status=failure";

I do not think the problem lies in flash, as the actionscript is passing the user and pass variables to the php script (I have confirmed this by printing the $pass and $user variables in the dynamic status box in flash)

here’s the address of the swf

I have created a row in phpmyadmin with the values of (0001,tester,entrykey)
even though these records exist in the database (and they display when I run the equivilent to $query in phpmyadmin) mysql_num_rows is always coming up with a value of 0. even if tester and entrykey are supplied as a username and password in flash.

what the hell is going on?