Fixed a slight problem involving the script not searching for anything.

This commit is contained in:
Matthew Thiffault 2009-03-11 00:54:50 -04:00
parent cf23cb2f0e
commit 9dbdedea0e
1 changed files with 10 additions and 10 deletions

View File

@ -14,9 +14,9 @@ print "Content-type: text/html\n\n";
$in = $ENV{'QUERY_STRING'}; $in = $ENV{'QUERY_STRING'};
@pairs = split(/[&=]/,$in); @pairs = split(/[&=]/,$in);
%fields = @pairs; %field = @pairs;
chomp(%fields); chomp(%field);
$webroot = "../../.."; $webroot = "..";
print <<END; print <<END;
@ -76,7 +76,7 @@ foreach $item (@items){
print "<br><br><br>\n"; print "<br><br><br>\n";
#display the search form #display the search form
if($fields{'do'} eq "home" || $fields{'do'} eq ""){ if($field{'do'} eq "home" || $field{'do'} eq ""){
#isbn,title,authors,year,edition,publisher #isbn,title,authors,year,edition,publisher
@ -116,7 +116,7 @@ END
} }
#query the database #query the database
if($fields{'do'} eq "query"){ if($field{'do'} eq "query"){
print "<h3>Search Results</h3>"; print "<h3>Search Results</h3>";
@ -131,15 +131,15 @@ if($fields{'do'} eq "query"){
$orterm = undef; $orterm = undef;
@results; @results;
@oresults; @oresults;
$title = $fields{'title'}; $title = $field{'title'};
$title =~ s/[';:"]/ /g; $title =~ s/[';:"]/ /g;
$publisher = $fields{'publisher'}; $publisher = $field{'publisher'};
$publisher =~ s/[';:"]/ /g; $publisher =~ s/[';:"]/ /g;
$edition = $fields{'edition'}; $edition = $field{'edition'};
$edition =~ s/[';:"]/ /g; $edition =~ s/[';:"]/ /g;
$year = $fields{'year'}; $year = $field{'year'};
$year =~ s/[';:"]/ /g; $year =~ s/[';:"]/ /g;
$isbn = $fields{'isbn'}; $isbn = $field{'isbn'};
$isbn =~ s/[';:"]/ /g; $isbn =~ s/[';:"]/ /g;
if($title){ if($title){