#!/usr/local/bin/perl use CGI; $query = new CGI; print $query->header; print $query->start_html('Multiple Forms'); print "
What's the combination?
", $query->checkbox_group('words',['eenie','meenie','minie','moe']); print "
What's your favorite color? ", $query->popup_menu('color',['red','green','blue','chartreuse']), "
"; print $query->submit('form_1','Send Form 1'); print $query->endform; # Print the second form print "
What's the password? ",$query->password_field('pass','secret'); print $query->defaults,$query->submit('form_2','Send Form 2'),"\n"; print $query->endform; print "
The combination is: {",join(",",@Q::words),"}\n"; print "
Your favorite color is $Q::color\n";
} elsif ($Q::form_2) {
print < The value of the radio buttons is $Q::radio_buttons
The secret password is $Q::pass
EOF
;
}
print qq{ Other examples};
print qq{ Go to the documentation};
print $query->end_html;