$act, "match_id" => $id, "match_date" => "", "division_id" => $_POST['division_id'], "league_id" => "", "opponent_id" => "", "map_id" => "", "jcp_score" => "", "opp_score" => "" ); } ?> $rowRost['user_id'], "username" => $username, "weapon" => $rowRost['weapon'], "kills" => $rowRost['kills'], "deaths" => $rowRost['deaths'] ); } } } if (isset ($_POST['Add'])) { // Make sure session variables are up to date $_SESSION['match_array']['match_date'] = $_POST['match_date']; $_SESSION['match_array']['league_id'] = $_POST['league_id']; $_SESSION['match_array']['opponent_id'] = $_POST['opponent_id']; $_SESSION['match_array']['map_id'] = $_POST['map_id']; $_SESSION['match_array']['jcp_score'] = $_POST['jcp_score']; $_SESSION['match_array']['opp_score'] = $_POST['opp_score']; $user_id = $_POST['user_id']; // Get username for the match_roster_array variable $resultUN = mysql_query ("SELECT `username` FROM `phpbb_users` WHERE `user_id`='$user_id'"); if (!$resultUN) { echo("error performing query: " . mysql_error() . ""); exit(); } $rowUN = mysql_fetch_assoc($resultUN); $username = $rowUN['username']; // Update match_roster_array with new member $_SESSION['match_roster_array']["$user_id"] = array( "user_id" => $user_id, "username" => $username, "weapon" => $_POST['weapon'], "kills" => $_POST['kills'], "deaths" => $_POST['deaths'] ); $act = "edit"; } else if (isset ($_GET['delete'])) { $delete = $_GET['delete']; unset ($_SESSION['match_roster_array']["$delete"]); $act = "edit"; } $row = $_SESSION['match_array']; // Get division information $resultDiv = mysql_query ("SELECT * FROM `jcp_divisions` WHERE `division_id` = '" . $_SESSION['match_array']['division_id'] . "'"); if (!$resultDiv) { echo("error performing query: " . mysql_error() . ""); exit(); } $rowDiv = mysql_fetch_assoc($resultDiv); $division_name = $rowDiv['division_name']; $division_icon = $rowDiv['icon']; ?>