Will, In your $dbh connection handler, you need to change the host=localhost and database= to just localhost and the database name.
$dbh = DBI->connect ("DBI:mysql:localhost;database_name", "******", "*******", {PrintError => 0, RaiseError => 1}); >>On Fri, 24 May 2002 16:43:50 +0000, "Will K." <[EMAIL PROTECTED]> wrote: >>I am trying to get an online database set up and running, but I keep getting >>error messages at login. >> >>Here are two sample scripts I have been running (both are from Paul DuBois' >>book MySQL and Perl for the Web). >> >>###### SCRIPT 1 ###### >> >>#! /usr/bin/perl -w >># intro4.pl - generate a Web page using the CGI.pm object-based interface >> >>use strict; >>use CGI; >>my $cgi = new CGI; >>print $cgi->header (), >>$cgi->start_html ("My Page Title"), >>$cgi->p ("My page body"), >>$cgi->end_html (); >>exit (0); >> >>###### SCRIPT 2 ###### >> >>#! /usr/bin/perl -w >># intro6.pl - connect to MySQL, retrieve data, write plain text output >>use strict; >>use DBI; >>use CGI qw(:standard); >> >>my ($dbh, $sth, $count); >>$dbh = DBI->connect ("DBI:mysql:host=localhost;database=*******", >> "******", "*******", {PrintError => 0, RaiseError => 1}); >>$sth = $dbh->prepare ("SELECT name, wins, losses FROM teams"); >>$sth->execute (); >>$count = 0; >>while (my @val = $sth->fetchrow_array ()) >>{ Mike(mickalo)Blezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! http://www.thunder-rain.com Tel: 1(225)686-2002 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php