#! /usr/bin/perl

use ccbs;
use strict;
use warnings;

ccbs::admin_only();

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

my $player = $cgi->param('player');
my $nick = $cgi->param('nick');
my $country = $cgi->param('country');
my $club = $cgi->param('club');

$club = undef if ($club == -1);

$dbh->do('UPDATE players SET nick=?, country=?, club=? WHERE player=?', undef, $nick, $country, $club, $player);
ccbs::print_see_other('player.pl?id=' . $player);

$dbh->disconnect;
