- or download this
use strict;
use warnings;
- or download this
use CGI::Carp qw{ fatalsToBrowser };
- or download this
use warnings FATAL => "all";
- or download this
Use of unitialized value in numeric eq (==) at login.cgi line 50.
- or download this
if($ref->{'counted'} == 1){
- or download this
my $dbh = connectDB();
my $sth = $dbh->prepare("SELECT count(id) as counted FROM perl_use
+rs WHERE `username` = ? AND `password` = ?");
...
$sth->execute($uname, $pass_hash);
my $ref = $sth->fetchrow_hashref();
- or download this
sub debug {
my ($msg) = @_;
...
print qq{<pre><b>Debug [line $lnum]</b>: $msg</pre>};
}
- or download this
if($q->request_method eq "POST"){
debug("Yes, the request method WAS 'POST'");
- or download this
my $uname = $q->param('uname');
my $pass = $q->param('pass');
debug("Passed values were: Uname=$uname Pass=$pass");
- or download this
#!/usr/bin/perl
...
my $id = $s->id;
print "<script>window.location.href = 'profile.pl?token=$id';</scr
+ipt>";