Login code wrong... I think... Help

My Login will not work. I have my flash login page here and my php code

if ($Email && $pass){
mysql_pconnect( 'XXXX', 'XXXX', 'XXXX' ) or die ("didn't connect to mysql");
mysql_select_db("XXXX") or die ("no database");
$query = "SELECT * FROM Invitation_Request WHERE username = '$Email' AND userpassword = '$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 a user name/password combination in our database. Usernames and passwords are entered in from a different file. Thank you for visiting test login script!!&checklog=2";

My login seems to stall every time …whats wrong?