438 Part IV . Development $quantity = param( quantity );

438 Part IV . Development $quantity = param( quantity ); $manu_id = param( manu_id ); $description = param( description ); $submit = param( submit ); $category_id = param( category_id ); $confirmed = param( confirmed ); $price =~ s/s//g; $quantity =~ s/s//g; $manu_id =~ s/s//g; # Print an HTML header print Content-Type: text/htmlnn ; # Test to make sure the user entered enough information. if ((! $name) || (! $price) || (! $quantity)){ print Not enough info specified.

; exit; } elsif ($price =~ /D.?D$/) { print Please enter only digits and decimal point for price.

n ; exit; } elsif ($quantity =~ /D/) { print Please enter only digits for quantity.

n ; exit; } # Connect to the database $dbh = DBI->connect( DBI:mysql:ecommerce: ,suehring, evh5150 ); if (! $dbh) { print Connection failed!!

; die(); } if ($submit) { # Look for a similar product to make sure we re not # adding a duplicate. $wcname = % . $name . % ; $wcartist = % . $artist . % ; $wcdescription = % . $description . % ; $quotedname = $dbh->quote($wcname); $quotedartist = $dbh->quote($wcartist); $quoteddescription = $dbh->quote($wcdescription); $query1 = SELECT name,artist,description FROM product WHERE name like $quotedname and artist like $quotedartist ; $sth1 = $dbh->prepare($query1); $sth1->execute; while (($ename,$eartist,$edesc) = $sth1->fetchrow_array()) {
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Leave a Reply