Skip to content

Instantly share code, notes, and snippets.

@bigpresh
Created September 13, 2010 14:13
Show Gist options
  • Save bigpresh/577344 to your computer and use it in GitHub Desktop.
Save bigpresh/577344 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use common::sense;
use Data::Dump;
use CGI;
my $cgi = CGI->new;
print $cgi->header;
my @selected = $cgi->param('myfield');
print "<pre>" . Data::Dump::dump(\@selected) . "</pre>";
print <<FORM;
<form method="get">
A: <input type="radio" name="myfield" value="RadioA" />
B: <input type="radio" name="myfield" value="RadioB" />
C: <input type="radio" name="myfield" value="RadioC" />
<br />
A: <input type="checkbox" name="myfield" value="CheckA" />
B: <input type="checkbox" name="myfield" value="CheckB" />
C: <input type="checkbox" name="myfield" value="CheckC" />
<br />
<input type="submit">
</form>
FORM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment