Brian,

If you're looking for info about CGI, here's a very simple short CGI Perl
script that will help answer your question. I'll put my comments at the end.

#!/usr/bin/perl

use CGI qw(:standard);

if (!param()) {
  print header;
  print start_html;
  print "<FORM>\n";
  print "<INPUT TYPE=RADIO NAME='color' VALUE='red'>Red<BR>\n";
  print "<INPUT TYPE=RADIO NAME='color' VALUE='blue'>Blue<BR>\n";
  print "<INPUT TYPE=HIDDEN NAME='hidden' VALUE='hello'>\n";
  print "<INPUT TYPE=SUBMIT>\n";
  print "</FORM>\n";
  print end_html;
} else {
  print header;
  print start_html;
  print "$ENV{'QUERY_STRING'}<BR>\n";
  print end_html;
}

If no parameters are submitted, print out the header and starting html info,
and then show this little form which has two radio buttons, a hidden piece of
information, and a submit button. When you click on the submit button, the
form submits the data to itself, and we run the else portion of the program.
The result looked like this for me:

color=red&hidden=hello

The $ENV{'QUERY_STRING'} is all of the submitted pieces of information all at
once, in pairs, with an & separating the pairs. To pull out individual pairs
with the CGI module, you can do:

$color=param('color');
$hidden=param('hidden');

I hope this helps.
    Pete

Reply via email to