Well here is my code... I *tried* to add the feature of using the thumbnail image as a link to the screen res image, and all hell broke loose. can someone help me here?
Here's the code, and the DB is intact, i know that isn't a problem: (and it runs from the command line fine)
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
print header(),
start_html("Street Print CD Catalog"),
h1("StreetPrint CD Catalog");
if (param()) {
my @supersaver = qw(Name Color Pattern CD_number Thumbnail_Image);
chomp(my $color = param("color"));
chomp(my $pattern = param("pattern"));
chomp(my $cd_number = param("cdnumber"));
print p(h4('You searched for:'),br(), h5("Color : $color"), h5("Patter
+n : $pattern"), h5("Cd Number : $cd_number"));
print table({-border=>1},Tr({-align=>'CENTER',-valign=>'MIDDLE'}, [td(
+{-width=>'150'}, [b($supersaver[0]), b($supersaver[1]), b($supersaver
+[2]), b($supersaver[3]), b($supersaver[4])])]));
open (DBFILE, "<scform.db") or die "$!";
while (my $line = <DBFILE>) {
chomp $line;
my @record = split /\|/, $line, 6;
## $record[0] is name, 1 => color, 2 => pattern, 3 => cd, 4 => thumbna
+il picture, 5=> screen res picture.
## C = color, P = Pattern, # = Cd Number, a = any
if( $color eq "Any" || $record[1] =~ /^$color$/i
and $pattern eq "Any" || $record[2] =~ /^$pattern$/i
and $cd_number eq "Any" || $record[3] =~ /^$cd_number$/i
) {
print table({-border=>1},Tr({-align=>'CENTER',-valign=>'MIDDLE'},
+[td({-width=>'150'}, [$record[0], $record[1], $record[2], $record[3],
+ [(start_a({-href=>"/images/screenres/$record[5]"}),img({-src=>"/imag
+es/thumbnails/$record[4]"}), end_a())]])]));
next;
}
}
close (DBFILE);
} else {
## stuff that doesn't matter to this problem
}
This is the site.
Thanks for all your help.
----------------------------
Wiz, The VooDoo Doll
Head Master of 12:30 Productions
----------------------------