#------------------------------------------------------------------------------- # FUNCTION: OpenSession($dbh, $sid) # Opens existing session or creates new depending on $sid #------------------------------------------------------------------------------- sub OpenSession{ my ($dbh, $sid)= @_; $session = new CGI::Session("driver:MySQL", $sid, {Handle=>$dbh, LockHandle=>$dbh}); return $session; }