From: Steinar H. Gunderson Date: Wed, 16 Feb 2005 14:10:57 +0000 (+0000) Subject: The "edit scores" backend now finds out which update button was pressed. X-Git-Url: https://git.sesse.net/?p=ccbs;a=commitdiff_plain;h=50e6991fc69f8bace6489c40dbbe6b5ba9df8572;ds=sidebyside The "edit scores" backend now finds out which update button was pressed. --- diff --git a/html/do-edit-scores.pl b/html/do-edit-scores.pl index 997d965..4b5d482 100755 --- a/html/do-edit-scores.pl +++ b/html/do-edit-scores.pl @@ -9,6 +9,17 @@ 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);