#shortened script #getting pars with CGI my $q = CGI->new(); my $LicenseKey = $q->param('key'); my $UserName = $q->param('user'); my $UserPW = $q->param('pw'); my $dbhServer = DBI->connect("DBI:mysql:$db:$host", $user, $pass); my $sth = $dbhServer->prepare("INSERT INTO Accounts VALUES (?, ?, ?, ?, ?)"); $sth->execute(undef, $LicenseKey, $UserName, $UserPW, $date) || print ("ERROR EXECUTION: " . $dbhServer->errstr); #same with updating my $sth = $dbhServer->prepare('update Accounts set UserName=?, Password=? WHERE LicenseKey=?'); $sth->execute($UserName, $UserPW, $LicenseKey)|| print ("ERROR EXECUTION: " . $dbhServer->errstr); $dbhServer->disconnect;