raviguhani has asked for the wisdom of the Perl Monks concerning the following question:
#!c:\perl\bin\perl.exe print "content-type:text/html\n\n"; ########################################### use strict; use DBI; # Connect to the database # See footnote 1 my $dbh = DBI->connect('DBI:mysql:mysql', 'root', 'mysql') or die "Couldn't open database: $DBI::errstr; stopped"; ##################################### my $log_name = "Ravi"; my $zzz=0; while ($zzz<=0) { chomp($log_name); my $sth = $dbh->prepare("SELECT username FROM passwd WHERE +login='$log_name'") or die "Couldn't prepare: '$DBI::errstr'; stopped"; $sth->execute() or die "Couldn't execute: '$DBI::errstr'"; my ($username) = $sth->fetchrow_array(); print STDOUT "Item: $log_name Username: $username\n"; $zzz=$zzz+1; #my $zzz=$zzz+1; } # Disconnect from the database $dbh->disconnect(); #############################################
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Not working in IIS and it is very Insecure
by moritz (Cardinal) on Aug 19, 2007 at 17:22 UTC | |
|
Re: Not working in IIS and it is very Insecure
by fmerges (Chaplain) on Aug 19, 2007 at 18:18 UTC | |
by raviguhani (Initiate) on Aug 19, 2007 at 18:26 UTC | |
by robot_tourist (Hermit) on Aug 20, 2007 at 10:41 UTC | |
|
Re: Not working in IIS and it is very Insecure
by wfsp (Abbot) on Aug 20, 2007 at 06:42 UTC |