package Mylib;

use strict;
use DBI;

sub OpenMyDB
    {
    my $path = "DBI:mydb:bdgdb:localhost";
# default mysql connection.
#    my $dbh = DBI->connect($path,"root","");
    my $dbh = DBI->connect($path,"myusername","mypassword");
    return $dbh;
    }

# Display empty field error.
sub DisplayEmptyError
	{
	my ($self, $fieldname) = @_;
	print "Please fill field <i>$fieldname</i>\n";
	exit;
 	}
1;
Hosted by www.Geocities.ws

1