From: arun Date: Sat, 3 Feb 2007 03:46:41 +0000 (+0000) Subject: better selection of players for new game X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=686b0be45302319f7f30d38d129cee68ebfc12bf;p=e-DoKo.git better selection of players for new game --- diff --git a/index.php b/index.php index 9842041..23262b9 100644 --- a/index.php +++ b/index.php @@ -22,8 +22,10 @@ output_header(); /* check if we want to start a new game */ if(myisset("new")) - output_form_for_new_game(); - +{ + $names = DB_get_all_names(); + output_form_for_new_game($names); +} /*check if everything is ready to set up a new game */ else if( myisset("PlayerA", "PlayerB","PlayerC","PlayerD" )) { diff --git a/output.php b/output.php index d73b9fe..ef67ccc 100644 --- a/output.php +++ b/output.php @@ -83,15 +83,20 @@ function output_ask_for_new_game($playerA,$playerB,$playerC,$playerD,$oldgameid) return; } -function output_form_for_new_game() +function output_form_for_new_game($names) { ?> -

Please add 4 names, please make sure that the names are correct!

+

Please select four players

- Name: - Name: - Name: - Name: + \n"; + foreach($names as $name) + echo " \n"; + echo " \n"; + } +?>