PHP woes -> php to Flash

Hi, i’m building a nickname checker in flash to see if a nickname is available but i’m getting undefined returned in the fields.

here’s my code

<?php
$usr_name = $_POST['user'];

$hostname_DB_conn = "localhost";
$database_DB_conn = "db";
$username_DB_conn = "test";
$password_DB_conn = "12345";
$DB_conn = mysql_pconnect($hostname_DB_conn, $username_DB_conn, $password_DB_conn) or trigger_error(mysql_error(),E_USER_ERROR); 



mysql_select_db($database_DB_conn, $DB_conn);
$query_findUser = sprintf("SELECT * FROM banner_usr WHERE usr_name = %s", $colname_findUser);
$findUser = mysql_query($query_findUser, $DB_conn) or die(mysql_error());
while($res = mysql_fetch_array($findUser)) {
	if($res->usr_name==$usr_name) {
		echo "&returnVal=Sorry, de gebruikers naam bestaat al";
	}else{
		echo "&returnVal=Yay ! hijs vrij !";
	}
}

?>