aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xform.cgi5
1 files changed, 2 insertions, 3 deletions
diff --git a/form.cgi b/form.cgi
index 05bfbd6..1cb91e4 100755
--- a/form.cgi
+++ b/form.cgi
@@ -1,5 +1,5 @@
#!/bin/perl -wT
-# (c) 2019 Dennis Eriksen <https://dnns.no>
+# (c) 2019-2022 Dennis Eriksen <https://dnns.no>
use strict;
use warnings;
@@ -34,13 +34,12 @@ if ($q->param('url')) {
while (my $url = $dbh->selectrow_array($query, undef, $short)) {
$results .= "Your short exists. Generating new.<br>\n";
$short = genshort();
- last;
}
# Insert short and url into database
$query = qq(INSERT INTO shorts (url, short, created_by) VALUES (?, ?, ?););
my $sth = $dbh->prepare( $query );
- my $rv = $sth->execute($url, $short, $user) or die $sth->errstr;
+ $sth->execute($url, $short, $user) or die $sth->errstr;
$dbh->disconnect();