Here's a fixed version of the code, toned down for only the things you need (i hope)
#!/usr/bin/perl -w use strict; use CGI qw(:standard); print header(), start_html(-title=>"Street Print CD Catalog", -background=>'/image +s/catalogbackground.jpg'); if (param()) { chomp(my $highres = param("highres")); print "<table border=1> <tr align=\"center\" valign=\"middle\"> <td width =\"150\"><h3>Name</h3><h6>Picture number<br>\& name</h6></td +> <td width =\"100\"><h3>Color</h3></td> <td width =\"100\"><h3>Pattern</h3></td> <td width =\"100\"><h3>CD Number</h3></td> <td width =\"100\"><h3>Printable image on cd?</h3></td> <td width =\"150\"><h3>Thumbnail Image</h3><h6>**Click to enlarge**</h +6></td></tr>"; open (DBFILE, 'scfrom.db') or die "$!"; while (my $line = <DBFILE>) { chomp $line; my @record = split /\|/, $line, 7; $record[6] =~ tr/\r\n//; ## $record[0] is name, 1 => color, 2 => pattern, ##3 => cd, 4 => thumbnail picture, 5=> screen res picture, ##6=> yes or no high res. 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 and $highres eq "Any" || $record[6] =~ /^$highres$/i ) { print "<tr align=\"center\" valign=\"middle\"> <td width=\"150\">$record[0]</td> <td width=\"100\">$record[1]</td> <td width=\"100\">$record[2]</td> <td width=\"100\">$record[3]</td> <td width=\"100\">$record[6]</td> <td width=\"150\"><a href=\"/images/screenres/$record[5]\"><img BORDER +=\"0\" src=\"/images/thumbnails/$record[4]\"></td> </tr>\n"; next; } } close (DBFILE); print "</table>"; } else { print start_form(); ##choose color ##choose pattern ##choose CD print p('Do you want high res printable images only? (Availible on the + CDs)', popup_menu(-name=>'highres', -default=>'Any', -values=>[qw(Any Yes)], -labels=>{Any=>'All Images', Yes=>'Only with +High res'})); print p(submit("Find"), reset("Reset")); print end_form; } print end_html;

----------------------------
Wiz, The VooDoo Doll
Head Master of 12:30 Productions
----------------------------

In reply to Re: Adding features to a CGI search engine by wiz
in thread Adding features to a CGI search engine by wiz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.