If you add a subroutine into manageusers.pm like this
sub getLoggedOn_user_id { my ($dbh,$query) = @_; my $session = CGI::Session->load( "driver:MySQL", $query, { Handle => $dbh } ); return $session->param("user_id"); }
then only change in your script is from
$userid_1 = $manageusers::LoggedOn_user_id;to
$userid_1 = manageusers::getLoggedOn_user_id($dbh,$q);One less 'global' to worry about
In reply to Re^28: global var
by poj
in thread global var
by tultalk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |