Web Hosting Talk







View Full Version : Perl Programming


desaint
05-05-2003, 02:42 PM
Hey guys,
I need a script for free or a one where i can download a script so i can setup a site that runs off of like products.cgi?product=apples and print that apple product.. thakns!

Dan L
05-05-2003, 03:32 PM
I can do it in PHP. :P

funzie
05-05-2003, 10:11 PM
Like this? I didn't test it but im sure it works.

$queryGotten=0;
$queryGotten=$ENV{'QUERY_STRING'};

print "Content-type: text/html\n\n";
@pairs = split(/&/, $queryGotten);

foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);

print "$name $value";

}
exit;
}