diff options
author | Dennis Eriksen <d@ennis.no> | 2022-08-17 07:09:56 +0200 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2022-08-17 07:09:56 +0200 |
commit | 544d037ba31bee5627b0006781e767508d26bec1 (patch) | |
tree | d3ec597b63a310c55bae22445cf07645e707f294 /form.cgi | |
parent | define value even if is undefined (diff) | |
download | purl-master.tar.gz |
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(); |