<?php 

	include('database.php');
	DB_connexion(); 

	if(isset($_POST['user']))
	{
		$user = $_POST['user']);
	
		$query = "SELECT * FROM joueursr WHERE nom ='$user'";
	
		if(mysql_num_rows(queryMysql($query)))// call queryMysql to get the results of the above query. If there aren't zero rows the name has been taken
		{
			echo "<font color=red> 
					Sorry, already taken</font>";// &larr is a left pointing arrow
		}
		else echo "<font color=reen> 
					Username available</font>";
}
?>

