in reply to Re: Dealing with uninitialized values
in thread Dealing with uninitialized values
grep, the "DBI::db=HASH(0x838242c)" I think is the result of DBI->connect("dbi:mysql:database=test;host=localhost;user=root;") being printed.
shalomgod, I would change the code like this to fix your error:I would also definitely recommend using placeholders, like grep said, and taint checking as well. I'd recommend checking out Ovid's CGI course at http://users.easystreet.com/ovid/cgi_course/, most importantly Lesson 3 on security.my $user = '1'; #or whatever default value you want print $query->header("text/html"), $query->start_html(-title => "Database Test"), $query->h1("Database Test"), $user = $query->param("username"), my $db_handle = DBI->connect("dbi:mysql:database=test;host=localhost; +user=root;") or die "Couldn't connect to database: $DBI::errstr\n";
|
|---|