]> git.sesse.net Git - ccbs/blobdiff - html/do-edit-scores.pl
The "edit scores" backend now finds out which update button was pressed.
[ccbs] / html / do-edit-scores.pl
index 7d3d4352a7307504dbee14909403ceb84cee977b..4b5d4828034597a8f2fe487ec1beb755a928d2ce 100755 (executable)
@@ -9,8 +9,18 @@ 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_header();
 ccbs::print_see_other('show-tournament.pl?id=' . $tournament);