echo '">' . "\n"; $n = (int) count($team_id_list) - 1; for ($i = 0; $i <= $n; $i++) { echo '<option value="'; // no htmlentities because team id 0 is reserved echo $list_team_id_and_name[0][$i]; if (isset($leader_of_team_with_id) && (int) $list_team_id_and_name[0][$i] === $leader_of_team_with_id) { echo '" selected="selected'; } echo '">' . $list_team_id_and_name[1][$i]; echo '</option>' . "\n"; } echo '</select></span></p>' . "\n"; } $new_randomkey_name = $randomkey_name . microtime(); $new_randomkey = $site->set_key($new_randomkey_name); echo '<div>'; $site->write_self_closing_tag('input type="hidden" name="key_name" value="' . htmlentities($new_randomkey_name) . '"'); echo '</div>' . "\n"; echo '<div>'; $site->write_self_closing_tag('input type="hidden" name="' . htmlentities($randomkey_name) . '" value="' . urlencode($_SESSION[$new_randomkey_name]) . '"'); echo '</div>' . "\n"; // find out the player's name $query = 'SELECT `name` FROM `users` WHERE `id`=' . sqlSafeStringQuotes($profile) . ' LIMIT 1'; if (!($result = @$site->execute_query('users', $query, $connection))) { echo '</form>' . "\n"; $site->dieAndEndPage('A database related problem prevented to find out the name of the player.'); } // initialise value $player_name = '(name could not be found)'; while ($row = mysql_fetch_array($result)) {