#!c:/perl/bin/perl -wt use strict; use CGI; $Query = new CGI; use DBI; $dbh = DBI->connect("DBI:mysql:exelstock") or die "Cannot connect: " . $DBI::errstr; $Value = $Query->param('Value'); $sth = $dbh->prepare("SELECT * FROM stock WHERE name='$Value'"); $sth = $dbh->execute(); print "Content-type: text/html\n\n"; print "\n"; print "\n"; while (@results = $sth->fetchrow_array) { print "@row\n"; } $sth = $dbh->finish(); $dbh->disconnect(); print "\n"; print "\n";