Location: PHPKode > scripts > Some Chess > some-chess/gameForm.php
<?PHP
//		Some Chess, a PHP multi-player chess server.
//		Copyright (C) 2006 Jon Link
//--NEW GAME FORM 
//--GET PLAYERS INFO
$queryVS			= 'SELECT * FROM players WHERE id !="'.$id.'" AND (invitedBy !="X" OR invitedBy="0") ORDER BY name';
$resultVS			= mysql_query($queryVS) or die('<div class="error">'.errorDBStr.'players</div>');
$numVS				= mysql_num_rows($resultVS);
for($i=0;$i<$numVS;++$i){
	$key			= mysql_result($resultVS,$i,'id');
	$VSid[$i]		= $key;
	$VSname[$key]	= mysql_result($resultVS,$i,'name');
}

echo'<form action="menu.php" method="post" class="menuBox" style="height:115px;">
	<h2>'.$menuStr[0].'</h2>
	<p>'.$menuStr[1].'<select name="vs"><option value=""></option>';
for($i=0;$i<$numVS;++$i){
	$key	= $VSid[$i];
	if($id != $key){
		echo'<option value="'.$key.'">'.$VSname[$key].'</option>';
	}
}
echo'</select></p>
	<p>'.$menuStr[2].'<select name="color">
		<option value="white">White</option>
		<option value="black">Black</option>
	</select></p>
	<input type="hidden" name="do" value="newGame" />
	<input type="submit" value="'.$buttStr[0].'" class="butt" />
</form>';
?>
Return current item: Some Chess