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 tournamentName,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 new arrays to store values $userList = array(); $tourneyList = 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"]; $tourneyList[] = $result["tournamentName"]; } // Remove duplicate entries $userList = array_unique($userList); // Sort the array to alphabetical order sort($userList); } catch (PDOException $e) { // failed connection echo "Connection failed: " . $e->getMessage(); } ?> GAME ADDING FORM

ADD GAME RESULTS

Add a recently-played game and save the results!


" tabindex="1" required>

If this game was part of a tournament, select it below

If you have uploaded a replay of this game to ballchasing.com, enter the ID code below.

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