<?php

	include('database.php');
	DB_connexion(); 
	
	
	echo "<label>Noir: </label>";
	echo "<select name='J2' id='J2'   onchange='active()'  >";
	if(isset($_POST["idcategorie"]))
	{
		//mysql_connect("localhost","root","");
		//mysql_select_db("website");
		/*$res = mysql_query("SELECT id,souscategorie FROM souscategorie 
			WHERE idcategorie=".$_POST["idcategorie"]." ORDER BY souscategorie");
		while($row = mysql_fetch_assoc($res)){
			echo "<option value='".$row["id"]."'>".$row["souscategorie"]."</option>";
		}*/
		
		/*$SQL = "SELECT * FROM membres";
		$SQL =" SELECT * FROM membres WHERE login != 'pistache' "; */
		$SQL = "SELECT * FROM elo_affectation WHERE joueur == '".$_POST["joueur"]."' ";
		
		$res = mysql_query($SQL);

		echo '<option value="vide">- - - Choisissez le Joueur 2 - - -</option>';
		
		while($val=mysql_fetch_array($res)) 
		{
			echo "<option>".$val["joueur"]."</option>\n";
		}
		
		
	}
	echo "</select>";
	
	
	
					
		
	
?>	