REG: dbi::errstr error.
am 27.01.2006 10:57:41 von rajadilly------=_Part_1373_15620750.1138355861304
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
I have a cgi script adduser.cgi which collects the data from the user
through adduser.html. when i execute this script i encountered the error as
shown below.
Name "dbi::errstr" used only once: possible typo at adduser.cgi line 18.
the complete script of the adduser.cgi is shown below. Since i am new to
perl and mysql i cant able to find out the reason for the error. i will
thankful if you find out the reason for this.
the cgi script is
#!c:/perl/bin/perl -w
use CGI;
use DBI;
my $cgi=3Dnew CGI;
$name =3D $cgi->param("name");
$email=3D$cgi->param("email");
$phone=3D$cgi->param("phone");
$address=3D$cgi->param("address");
$username=3D$cgi->param("username");
$password=3D$cgi->param("password");
my $dbh=3DDBI->connect ("DBI:mysql:dvd","","autoraja")||
die "Error opening database: $DBI::errstr\n";
$sth=3D$dbh->prepare("insert into user(name, email, phone, address, usernam=
e,
password)
values($name, $email, $phone, $address, $username, $password)")=
;
$sth->execute()||die "Unable to insert the value: $dbi::errstr\n";
$dbh=3Ddisconnect();
print "Content-type: text/html\n\n";
print "";
print "
print "";
if($name eq "")
{
print "
Invalid Name. Please Try Again.
";exit (0);
}
print "The name is ", $name, "";
print "