print "Content-type: text/html\n\n"; use DBI; # database information # make connection to database $dbh = DBI->connect($connectionInfo,$userid,$passwd); # prepare and execute query $query = "SELECT * FROM employees ORDER BY lastName, firstName"; $sth = $dbh->prepare($query); $sth->execute(); # assign fields to variables $sth->bind_columns(undef, \$employeeID, \$firstName, \$lastName); print "Employees in the inventory database:
"; print "
"; $sth->finish(); #disconnect from database $dbh->disconnect;