I'm confused about this part. In previous you mentioned to put that line in, the link said not to. I did comment that finish line out.

I was getting the declaration error on if($id eq $subscr_id); until I put if($id eq '$subscr_id'); I don't know if that's correct to do.

Then $subscr_id at the bottom is now tossing the error that's just a bit different. I don't know if perl checks the complete script first or as it runs, but this is the fail section if $id does not equal $subscr_id

# no need to select subscr_id since we already know that value # and will be using it to retrieve the "username", if the id is found my $sql = "SELECT username FROM members WHERE subscr_id = ?"; my $sth = $dbh->prepare($sql); $sth->execute($id); my $username = $sth->fetchrow_array;

$sth->finish(); $dbh->disconnect;

return $username; # returns the 'username' or undef if not found in the db }

Since you've made a number of changes to the script, we'll need to see your current version so we can point out other changes that it might need.

#!/usr/bin/perl use warnings FATAL => 'all'; use strict; use diagnostics; use CGI qw/param/; use POSIX qw/strftime/; use DBI; use CGI::Carp qw(fatalsToBrowser); # remove this when the script is complete and put into production