if ($command eq 'whatever') {
pages? Only on the 'else {' page can I add the parameters to the URL to make them show up.....(Note the # lines below for info).
if (length ($ENV{'QUERY_STRING'}) > 0){
$buffer = $ENV{'QUERY_STRING'};
@pairs = split(/&/, $buffer);
foreach $pair (@pairs){
($name, $value) = split(/=/, $pair);
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$in{$name} = $value;
}
}
$query1 = $in{'query1'};
$query2 = $in{'query2'};
if ($ENV{'QUERY_STRING'} ne '') {
$command = "$ENV{'QUERY_STRING'}";
}
print "Content-Type: text/html\n\n";
if ($command eq 'index') {
print <<EOM;
#In this page the $query stuff doesn't work when I add it to the URL. Instead, adding them to the URL makes the stuff from the page below come up (else { page).
<A HREF="file.cgi?siteid=$query1&query=$query2">Whatever</a>
EOM
}
else {
print <<EOM;
#Now on this page, the stuff from the URL does show up in the page, everything works fine here.
<A HREF="file.cgi?que=$query2&query=$query2">Whatever</a>
EOM
exit;
}