#! /usr/bin/perl

use ccbs;
use strict;
use warnings;

my $dbh = ccbs::db_connect();
my $cgi = new CGI;

my $tournament = $cgi->param('tournament');

# Loop through all parameters until we find the update button
my $player;
for my $param ($cgi->param()) {
	if ($param =~ /^update(\d+)$/) {
		$player = $1;
		last;
	}
}

die "Form-submit uten å trykke på noen update-knapp?" unless (defined($player));

$dbh->disconnect;

ccbs::print_see_other('show-tournament.pl?id=' . $tournament);

