diff options
Diffstat (limited to 'form.cgi')
-rwxr-xr-x | form.cgi | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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(); |