File "joueur_requete_ajax.php"

Full Path: /home/analogde/www/Code01/copy/joueur_requete_ajax.php
File size: 492 bytes
MIME-type: text/x-php
Charset: utf-8

<?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>";
}
?>