#these are the default paths to search for files
push(@INC,"/.../.../cgi-bin/");
$category = "";
$brand = "";
$price = "";
$location = "";
$description = "";
$PIC_URL1 = "";
$PIC_URL2 = "";
$PIC_URL3 = "";
use DBD::mysql;
use DBI;
$dbh=DBI->connect("DBI:mysql:whatever:whatever:whatever","whatever",'whatev;
$sth=$dbh->prepare("SELECT * FROM sell");
$sth->execute();
#$results = $sth->rows;
#$i=0;
while(@ref = $sth->fetchrow_array())
{
$category = "$ref[0]";
$brand = "$ref[1]";
$price = "$ref[2]";
$location = "$ref[3]";
$description = "$ref[4]";
$PIC_URL1 = "$ref[5]";
$PIC_URL2 = "$ref[6]";
$PIC_URL3 = "$ref[7]";
#$i++;
}
$sth->finish();
$dbh->disconnect();
print "Content-type: text/html\n\n";
print<<"eot";
<HTML>
<HEAD><TITLE>Kbay Buy Page</TITLE></HEAD>
<BODY BGCOLOR=WHITE TEXT=BLUE>
<font size = 5>
<P>
$category $brand $price $location $description $PIC_URL1 $PIC_URL2 $PIC_URL3
<P>
</BODY>
</HTML>
eot
exit;
my $output = '<table>';
while(@ref = $sth->fetchrow_array())
{
$output .= '<tr><td>' . join(' ',@ref) . '</td></tr>';
}
$output .= '</table>';
$sth->finish();
$dbh->disconnect();
print "Content-type: text/html\n\n";
print qq~
<HTML>
<HEAD><TITLE>Kbay Buy Page</TITLE></HEAD>
<BODY BGCOLOR=WHITE TEXT=BLUE>
$output
</BODY>
</HTML>
~;
exit;
you can fiddle with the html display to get it how you want it.