Sweet, I finished it!
This script takes the player names as a comma-delimited list from the querystring. For example, to pass it the players "bob", "bad_goose", "supall", and "player4" , the URL would be:
thisscript.php?players=bob,bad_goose,supall,player4
The chunk of code in the if($flag) section near the end will be executed after all the choices are made.
The script is too big to paste in here, so I attached it.
Hopefully you have php4, because that's what I wrote it for. If not, you can probably adapt it.