-----------------CLIENT.PM----------------- #!/usr/bin/perl package Client; use strict; # Include Database connect file here require '/home/www/www/cgi-bin/db_connect.pl'; require '/home/www/www/cgi-bin/global_subs.pl'; sub new { my($Class) = shift; my($ClientId) = shift; my $sth = $main::dbh->prepare ("SELECT client_fname, client_lname, email, password, status FROM client_info WHERE client_id = '$ClientId' "); $sth->execute();# or &PrintMessage("$BaseDir/templates", $ErrorGeneralTmplt, "An Error has occurred.
click here to go back.
", "exit"); my $hashref = $sth->fetchrow_hashref (); my $Self = [ { "FirstName" => $hashref->{'client_fname'}, "LastName" => $hashref->{'client_lname'}, "PrimaryEmail" => $hashref->{'email'}, "Password" => $hashref->{'password'}, "Status" => $hashref->{'status'}, } ]; bless $Self, $Class; } sub get_status { my($Self) = shift; return $Self->{"Status"}; } 1; -------------------------------------------