#!/usr/bin/perl # # # --------------------------------------------------------------------------- # CONSTANTS # --------------------------------------------------------------------------- ######## sub read_input { local ($buffer, @pairs, $pair, $name, $value, %FORM); # Read in text $ENV{'REQUEST_METHOD'} =~ tr/a-z/A-Z/; if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } else { $buffer = $ENV{'QUERY_STRING'}; } # Split information into name/value pairs @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%(..)/pack("C", hex($1))/eg; $FORM{$name} = $value; } %FORM; } #********************* %incoming = &read_input; # Read information into associated # array %incoming. $cat = $incoming{'cat'}; $nl = $incoming{'nl'}; if ($cat eq "") {$cat = "health"};if ($nl eq "") {$nl = "30"}; #********************* ####### # ---- Make sure a valid plan was selected ----- # $searchkey = $ENV{'QUERY_STRING'}; # if ($searchkey eq "") # {$searchkey = "shopping"}; # #***************************************************************************** print <<"EndOfHTML"; Content-type: text/html
Prescription | Non-Prescription | PriceList | About Us | Faq | Affiliates | Physcians | Contact Us
© 2002 DrugEstores.com
All Rights Reserved