sub getdata{ my($query) = "SELECT * FROM dataprofiles where $searchquery"; my($sth) = $dbh->prepare($query); $sth->execute || die("Couldn't exec sth!"); while(@row = $sth->fetchrow) { $vprofilenumber = $row[0]; $vStatus = $row[1]; $vPricePlusProduct = $row[2]; $vKeywords = $row[3]; $vUsername = $row[4]; print <Price Check

\$$vStatus--$vPricePlusProduct

EndHTML } $sth->finish; }