setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Grab the list of users from the user list // We will also grab all the people that have been registered/won before $sqlGetUserData = $conn->prepare("SELECT username FROM " . $userTableName . ""); $sqlGetTourneyData = $conn->prepare("SELECT winner1,winner2,winner3,winner4 FROM " . $tournamentDataTableName . ""); // Execute SQL query $sqlGetUserData->execute(); $sqlGetTourneyData->execute(); // Get results from the USERS table $results = $sqlGetUserData->fetchAll(PDO::FETCH_ASSOC); // Create array to store values $userList = array(); // Move results to their own array, easier to convert for Javascript foreach ($results as $result) { $userList[] = $result["username"]; } // Get results from the TOURNEY table $results = $sqlGetTourneyData->fetchAll(PDO::FETCH_ASSOC); // Move results to their own array, easier to convert for Javascript foreach ($results as $result) { $userList[] = $result["winner1"]; $userList[] = $result["winner2"]; $userList[] = $result["winner3"]; $userList[] = $result["winner4"]; } // Make sure we only have each name once $userList = array_unique($userList); // Sort the array to alphabetical order sort($userList); } catch (PDOException $e) { // failed connection echo "Connection failed: " . $e->getMessage(); } ?> TOURNAMENT ADDING FORM

ADD NEW TOURNAMENT

Add a recently-played tournament and record the victors.

Users will be able to add their own replays and information to the tournaments (later).

This is also how trophies will be tracked!


" tabindex="1" required>

WINNING TEAM NAME:

Roster

If you have any notes about the tournament, leave them below

Once the tournament is created, users will be able to attribute their games to it through the game creation/editing screen.